EDIT: Looks like I'm completely misinformed. Close this topic. G.
For recording, the following compilation and work:
class ForeverAlone { private: int m_friends; HANDLE m_handle; public: ForeverAlone() { m_handle = CreateThread(NULL, 0, &ForeverAlone::SadThread, reinterpret_cast<void*>(this), 0, NULL); } ~ForeverAlone() { if (m_handle != NULL) CloseHandle(m_handle); } protected: static unsigned long WINAPI SadThread(void* param) { ForeverAlone* thisObject = reinterpret_cast<ForeverAlone*>(param);
The original question: I have a static protected thread method with which I pass an object. Is there any way to create a friend class so that I can access its private members?
user2058002
source share