Coming from other programming languages I have ssen something unusual in C++
I was looking at a some code where someFunction() was defined globally
The programmer then went on to instantiate an object as follows
sav=(SObj*)GetWindowLong(hwnd,GWL_USERDATA);
He then made the following call
sav->someFunction();
How is this possible since someFunction is not a member of SObj
I was looking at a some code where someFunction() was defined globally
The programmer then went on to instantiate an object as follows
sav=(SObj*)GetWindowLong(hwnd,GWL_USERDATA);
He then made the following call
sav->someFunction();
How is this possible since someFunction is not a member of SObj