Hi all, I have a very strange problem and the following code wont compile:
#ifndef MYWINDOW_HPP_INCLUDED
#define MYWINDOW_HPP_INCLUDED
class MyWindow{
private:
WNDCLASSEX window_class;
HWND window_handle;
HDC device_context_handle;
HGLRC open_gl_render_context;
MSG message;
BOOL quit;
public:
Window(int height=416, int width=544, WindowStyle window_style=WINDOWED);
void Show();
void Close();
~Window();
};
#endif // MYWINDOW_HPP_INCLUDED
I get the following error: error: expected '=', ',', ';', 'asm' or 'attribute' before 'MyWindow'
I can't see any syntax errors here, although I coukd be wrong as I am very (very) new in c++. Thanks in advance, ell.
EDIT: Yeah, I tried renaming my class to MyWindow from Window to solve the problem but it didn't work, I forgot to rename the constructor. I have updated the code now but that still hasn't solved the problem. Here is the only other code I have in my project, I linked it because adding al those spaces would take a while: here's the code