473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Compiler error C2143 Why??

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.
--
Mike Reed
Mar 13 '06 #1
2 2593
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 :-)
"Michael D. Reed" <ch******@online.nospam> wrote in message
news:5B**********************************@microsof t.com...
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.
--
Mike Reed

Mar 13 '06 #2
Hi Michael,

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

Cheers
Doug Forster

"Michael D. Reed" <ch******@online.nospam> wrote in message
news:5B**********************************@microsof t.com...
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.
--
Mike Reed

Mar 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rhodrey | last post by:
I have the following code: #include <iostream> #include <fstream> #include <string> #include <iomanip> #include <cstdlib> #include <conio.h> #include "stdinfo.h"
11
by: Alf P. Steinbach | last post by:
// As usual the error message directs one to the report the bug. // // And as usual there is absolutely no way to do so without paying for // the privilege... // // Or using three or four hours...
2
by: kalpana.sinduria | last post by:
Hi all, how to remove the following complle error. When I compiling the code I get the following errors: Compiling... CDrtEachDefFeat.cpp d:\ include\common\cdrtintegfeat.h(39) : error...
0
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
2
by: David Steward | last post by:
I am really scratching my head on this problem. I am trying to set up a very simple linked list using the <list> STL. As an example I wrote sample code just like what is given in the help files....
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: Rob | last post by:
The following causes an internal compiler error: void f (int &a) { int (const &b) = a; } (Yes I know it's not correct c++). Rob.
2
by: im2cre8iv | last post by:
Here is my code where I am receiving the error: #include <fstream> #include "BinaryTree.h" using namespace std; Node* BinaryTree::MakeTree(ifstream& infile) { char name; infile>>name;
2
by: Prashanth Kumar B R | last post by:
Hello, I have the below typedef statements in one of my header file. // // Type Definitions // typedef unsigned long DWORD; typedef unsigned int UINT; typedef unsigned short WORD;
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.