I have a class (in the wxWidgets framework) defined like that:
class SomePanel : public wxPanel{
public:
...
void SomeMethod(const std::string& id){
pointer->UseId(id);
}
const std::string id = "Text"; // still in public area
...
}
Somewhere else in the pogram I create a reference to an instance of this object...
mSomePanel = new SomePanel();
... then I want to do this
mSomePanel->SomeMethod(mSomePanel->id); // Compiler gives an error saying that
// there is no element named id.
In the (ctor of the) class I am able to call the same method with this member variable. Where does the problem lie?