Class errors

HELP! Im geting an error when i try to compile my source code.
Here is the error:
E:\VirusGL\Virus\main.cpp|3|error: 'Echelon' does not name a type|
Source code:
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef ECHELON_H
#define ECHELON_H

class Echelon
{
    public:
        Echelon();
        ~Echelon();
        void Initialize(int width, int height, int colorDepth, char title, bool fullscreen);
    private:
}

#endif 
Your error appears in the main, but the snippet you posted definitely isn't your main.

Anyway, C++ class definitions end with a ';'.
1
2
3
class myClass { 
    // BODY 
};
Well i have changed that and i still get the same error.
The code in main that it complains about is this:
Echelon echelon;
You did include echelon.h in main.cpp, right?
No...
...it might help if you did.
Add #include "<filename>" (replace <filename> with the name of the file that has the Echelon definitions) at the top of main.cpp (or whatever file has the main() function).
It worked! Only that it should be #include "filename".
Thank you all so much!
Topic archived. No new replies allowed.