class GuiLock { // <--- changed struct to class public: // <--- added. GuiLock() { EnterGuiMutex(); } ~GuiLock() { LeaveGuiMutex(); } }; class GuiUnlock { int n; public: GuiUnlock() { n = LeaveGuiMutexAll(); } ~GuiUnlock() { EnterGuiMutex(n); } };
Report message to a moderator