D
DaJones
In Delphi everything declared in the same file (or unit in Delphi speak) can
see each other. 2 classes in one file can access each others private data /
methods.
It doesnt seem like this is the case in C++?
I was knocking up a basic windows app and found that a plain function (the
WindowProc callback) cant access private members of a class even though it's
definition is in the same file. So I assume i need to make it a static
member of the Window class? Or mark it as a freind function? I think the
former makes more sense as the WindowProc function is only used with the
Window class.
Does this seem like the right aproach?
see each other. 2 classes in one file can access each others private data /
methods.
It doesnt seem like this is the case in C++?
I was knocking up a basic windows app and found that a plain function (the
WindowProc callback) cant access private members of a class even though it's
definition is in the same file. So I assume i need to make it a static
member of the Window class? Or mark it as a freind function? I think the
former makes more sense as the WindowProc function is only used with the
Window class.
Does this seem like the right aproach?