none
Class implementation

    Question

  • Hi!

    I'm trying to implement a base class to my project but when compiling I get the following errors:

    error C2871: 'std' : a namespace with this name does not exist
    error C2146: syntax error : missing ';' before identifier 'nome'
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C2146: syntax error : missing ';' before identifier 'username'
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C2146: syntax error : missing ';' before identifier 'password'
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    error C2061: syntax error : identifier 'string'
    error C2535: 'utilizador::utilizador(void)' : member function already defined or declared
    see declaration of 'utilizador::utilizador'

    the class is:

    utilizador.h

    #ifndef UTILIZADOR_H
    #define UTILIZADOR_H

    using namespace std;

    class utilizador{

    protected:
        string nome;
        string username;
        string password;

    public:
        utilizador( void );
        utilizador( string username, string password, string nome );
        //utilizador( const utilizador & );
        ~utilizador( void );
    };
    #endif



    utilizador.cpp


    #include "utilizador.h"


    utilizador::utilizador( void )
    {

    }

    utilizador::~utilizador( void )
    {

    }

    utilizador::utilizador( string username, string password, string nome )
    {

    }


    /*utilizador::utilizador(const utilizador &util)
    {
        util.nome;
        util.username;
        util.password;

    }*/
    Tuesday, December 30, 2008 2:07 PM

Answers

  • thread solved... missing includes in the file!

    I'll comeback:p
    • Marked as answer by jorijo Tuesday, December 30, 2008 2:21 PM
    Tuesday, December 30, 2008 2:21 PM