hey does anyone what these errors mean:

-----------------------------------------------------------------
--------------------Configuration: a1 - Win32 Debug--------------------
Compiling...
a1.cpp
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(47) : error C2146: syntax error : missing ';' before identifier 'rightNum'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(48) : error C2146: syntax error : missing ';' before identifier 'bSqMINrightN'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(49) : error C2146: syntax error : missing ';' before identifier 'discrim'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(50) : error C2146: syntax error : missing ';' before identifier 'denom'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(51) : error C2146: syntax error : missing ';' before identifier 'root1'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(52) : error C2146: syntax error : missing ';' before identifier 'root2'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(55) : error C2146: syntax error : missing ';' before identifier 'cout'
Error executing cl.exe.

Recommended Answers

All 4 Replies

Compiling...
a1.cpp
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(47) : error C2146: syntax error : missing ';' before identifier 'rightNum'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(48) : error C2146: syntax error : missing ';' before identifier 'bSqMINrightN'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(49) : error C2146: syntax error : missing ';' before identifier 'discrim'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(50) : error C2146: syntax error : missing ';' before identifier 'denom'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(51) : error C2146: syntax error : missing ';' before identifier 'root1'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(52) : error C2146: syntax error : missing ';' before identifier 'root2'
C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(55) : error C2146: syntax error : missing ';' before identifier 'cout'
Error executing cl.exe.

aha...I have faced these problems too..they are all syntax errors...make sure you have put " << " in all cout statements and inverted commas-" at the start and end of a cout statement like this: cout << " Please go to sleep: " << gotosleep << endl ;

Also,the variables declared as global or as default parameters should match the one's you enter as locals...hope I made myself clear...

> hey does anyone what these errors mean:
>
> -----------------------------------------------------------------
> --------------------Configuration: a1 - Win32 Debug--------------------
> Compiling...
> a1.cpp
> C:\Documents and Settings\Jinu\My Documents\Stuff\C++\Development\a1.cpp(46) : error C2146: syntax error : missing ';' before identifier 'bSq'


Only that there's a syntax error somewhere around or prior to line 46. Need to see the code.

You Must write a semicolon(;) after any statement to make the compiler understand thau u finished the statement..okay
and i need to see the code ..

Hey Buddy,

The errors you're getting mean you've missed a semicolon (";") at the end of the line of code preceeding the ones your recieving errors for. Simply check the lines before the line numbers stated in the errors (there may be only 1 case of missing semicolon) and make sure you have a semicolon on the end.

Good Luck

MoreCom.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.