Compiler error C2143 Why??

G

Guest

Why do I get the following errors:
Error 1 error C2143: syntax error : missing ';' before '*'
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does
not support default-int
I am assuming the Error 2&3 follow because of Error 1.
The line of code that generates is:
CFluid* m_pFluid;
It is in a header file. CFluid is a class with its own header file, which
is included in the file that generates the error.
It does not matter where I move the line it still generates the same error.
The above errors are the only errors or warning generated. If I add another
declaration for CFluid, such as “CFluid* test;’ that too generates the same
error. If I rename the class, CFluid the same error with the new class name.
The code I am working with is some legacy C++ code I am trying bring into
the management evolvement. It compiled as a DLL the was call by another C++
program and was not a com DLL.
Any help of where to look would be helpful.
 
M

Marcus Heege

It is quite difficult to reverse engineer your code from the compiler errors
you tell us. If you post a simple piece of code that causes these errors,
your chances are good to get a more satisfying answer :)
 
D

Doug Forster

Hi Michael,

Sometimes this kind of error can be caused by circular includes.

Cheers
Doug Forster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top