syntax error after including class definition [message #235038] |
Mon, 22 June 2009 05:15  |
Eclipse User |
|
|
|
Hi,
I am using eclipse platform Version: 3.4.2 Build id: M20090211-1700
together with cdt 5.0.2 and gcc compiler.
I define a class "PrintUtil.h" and build the project. Everything is ok.
I include the header file of the class in main program and build the
project. Now I get syntax error in the header file of the class
..\src\PrintUtil.h:11: error: syntax error before "PrintUtil"
..\src\PrintUtil.h:11: error: syntax error before '{' token
Hier is the code for the class header file "PrintUtil.h"
#ifndef PRINTUTIL_H_
#define PRINTUTIL_H_
class PrintUtil {
public:
void getApplicationInformation()
{
printf("rns version 2.1");
}
};
#endif /* PRINTUTIL_H_ */
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04174 seconds