freelanceprogrammers.org Forum Index » C
(Query)mostly about "error C2143"
Joined: 20 Jul 2003
Posts: 6
(Query)mostly about "error C2143"
Hi,I wrote a program which gave me 102 errors and 3 warnings. The majority of the 102 errors are "error C2143: syntax error : missing `;` before `PCH creation point`", while some are "error C2143: syntax error : missing `;` before `{` / `)`".
Also, my FFS::display(int min, ofstream outfile) and FFS::closedstall_loss() have the following errors: error C2601: `display` : local function definitions are illegal.
My last error was "fatal error C1003: error count exceeds 100; stopping compilation". It points to the "while (!infile.eof())" line in the function that reads input from a text file.
The 2 warnings are "warning C4552: ` : operator has no effect; expected operator with side-effect". The mentioned is supposed to be used as a "greater sign".
I checked my programs and can`t find (or must have missed) any missing ;.
Please help!
Thank you.
Regards,
Rayne
Joined: 25 Jul 2003
Posts: 48
(Query)mostly about "error C2143"
Several issues:
1. In the definition of member function FFS::update(), the braces does
not match. You most likely misses the closing brace for the if-block:
if (ctr[i].open())
The closing brace that is suppose for the function (based on your
indentation level) becomes the closing brace for the outer-most
while-loop. This makes the definition of FFS::display() part of
FFS::update(), which causes the error C2601.
2. In FFS::readCtrInfo(), you have an identifier `in`. I think you
meant std::cin.
3. In main(), you have a few undefined identifiers: `outfile` and `i`.
Please specify your compiler and its version in the future.
HTH
Shyan
-----Original Message-----
From: Rayne [mailto:ghcgwgwg@...]
Sent: Thursday, July 31, 2003 07:15
To: Programmers-Town@yahoogroups.com
Subject: *(&Programmers-Town&)* (Query)mostly about "error C2143"
Hi,
I wrote a program which gave me 102 errors and 3 warnings. The majority
of the 102 errors are "error C2143: syntax error : missing `;` before
`PCH creation point`", while some are "error C2143: syntax error :
missing `;` before `{` / `)`".
Also, my FFS::display(int min, ofstream& outfile) and
FFS::closedstall_loss() have the following errors: error C2601:
`display` : local function definitions are illegal.
My last error was "fatal error C1003: error count exceeds 100; stopping
compilation". It points to the "while (!infile.eof())" line in the
function that reads input from a text file.
The 2 warnings are "warning C4552: `<` : operator has no effect;
expected operator with side-effect". The < mentioned is supposed to be
used as a "greater sign".
I checked my programs and can`t find (or must have missed) any missing
;.
Please help!
Thank you.
Regards,
Rayne
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







