Just installed CDT for eclipse, with MinGW gcc. C program "HelloWorld" compiles and runs ok. But tried adding a class declaration in a new .h file to it. Syntax error on class definition. Tried writing my own class declaration and using the new class wiz.
Have used many other C++ ide's other than eclipse. Would like to use eclipse for team integration. What's the eclipse secret to get class declaration to work?
Here's the errors: gcc -O0 -g3 -Wall -c -fmessage-length=0 -o src\main.o ..\src\main.c In file included from ../src/main.c:10:
../src/Logger.h:11: parse error before "Logger"
../src/Logger.h:11: syntax error before '{' token
Here's the class header file "Logger.h" where the error occurs.
#ifndef LOGGER_H_
#define LOGGER_H_
class Logger {
public:
Logger();
virtual ~Logger();
};
#endif /* LOGGER_H_ */