hy guys! I have a code that gives me headaches. I would like some help please. This is my .h file.
#include <iostream>
#include <string>
using namespace std;
namespace UI{
class Comanda
{
private:
const string _nume;
public:
Comanda();
Comanda(const string &nume);
virtual ~Comanda();
const string& Nume() const;
virtual void AsteaptaEnter();
virtual void Execute();
};
};
And the .cpp:
#include <iostream>
#include <string>
#include "Comanda.h"
#include "Exceptii.h"
using namespace std;
using namespace UI;
Comanda::Comanda()
{
cout << "Comanda()" << endl;
}
Comanda::Comanda(const string &nume)
{
_nume = nume._nume;
}
The compiler shows me this error:
error C2039: '_nume' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
What should i do? Thanks in advance!