I'm trying to create a class inside a header file so that all my files can access that 1 class and only use that one. This is what I have so far.
----------
Window.h:
class Window
{
public:
Window();
~Window();
/* FUNCTIONS */
HWND OpenWindow(LPCTSTR, int, int);
/* VARIABLES */
int IsRunning;
};
typedef class Window *WINDOW;
----------
Main.h:
class Main
{
public:
Main();
~Main();
WINDOW GameWindow;
};
Main::Main()
{
Main::GameWindow = new Window();
}
typedef class Main *MAIN;
----------
The above code works and lets me call Main::GameWindow in every file but that's as far as I can go. I can't call Main::GameWindow->OpenWindow(). How do I fix this?