prog.cpp: In static member function ‘static void Test::MyStaticFunction()’:
prog.cpp:17:2: error: invalid use of member ‘Test::myVar’ in static member function
myVar = 1; // Line 3
^~~~~
prog.cpp:6:5: note: declared here
int myVar;
^~~~~
prog.cpp: In function ‘int main()’:
prog.cpp:27:15: error: ‘void Test::MyFunction()’ is private within this context
t.MyFunction();
^
prog.cpp:9:6: note: declared private here
void MyFunction()
^~~~~~~~~~
prog.cpp:28:27: error: ‘static void Test::MyStaticFunction()’ is private within this context
Test :: MyStaticFunction();
^
prog.cpp:15:13: note: declared private here
void static MyStaticFunction()
^~~~~~~~~~~~~~~~