I have a project in Visual Studio 2008 which includes both .c and .cpp files. I have no problem compiling the .cpp file. However, there is a problem in the header of a .cpp file.
In the header I have a class which looks somthing like this:
class TSerial
{
private:
//variables
public:
//functions
};
I get an error that says:
error C2061: syntax error : identifier 'TSerial'
error C2059: syntax error : ';'
error C2449: found '{' at file scope (missing function header?)
error C2059: syntax error : '}'
.......I don't see anything wrong with my syntax. Why am I getting this error?? Also, in the
Configuration Properties
C/C++
Advanced options
Compile as
is set to "Compile as C++ Code (/TP)"
Any suggestions?
Thanks in advanced,
Sevak.
In the header I have a class which looks somthing like this:
class TSerial
{
private:
//variables
public:
//functions
};
I get an error that says:
error C2061: syntax error : identifier 'TSerial'
error C2059: syntax error : ';'
error C2449: found '{' at file scope (missing function header?)
error C2059: syntax error : '}'
.......I don't see anything wrong with my syntax. Why am I getting this error?? Also, in the
Configuration Properties
C/C++
Advanced options
Compile as
is set to "Compile as C++ Code (/TP)"
Any suggestions?
Thanks in advanced,
Sevak.
Comment