Original Post
In my program, I have a variable declared as private in one of my classes, but I can't seem to call it, even though the function I am calling it from is part of the same class. (No, setFinished is not the actual function, that would be pointless) The compiler spits out the following error: error C2597: illegal reference to non-static member 'cPlatform::finish' I guess I still don't understand OOP well enough, but my understanding was that private meant that it could be accessed from within the same class.
//header
class cPlatform
{
private:
bool finish;
void setFinished();
};
//CPP
void cPlatform::setFinished()
{
finish = true;
}