| .NET DotNet Forum Index » Visual C++ Forum » Absolute newbie question... |
|
Page 1 of 1 |
|
| Author |
Message |
| bm1968 at (no spam) gmx.net... |
Posted: Sat Sep 19, 2009 10:53 am |
|
|
|
Guest
|
Sorry, I have an absolute newbie question...
Can you please tell me what I'm doing wrong here? Compiler says "Missing
";" before '&&' and when I click the error, it points to the first line
of the code below
if ( lLeft > 0 ) && ( lTop > 0 ) && ( lWidth > 0 ) && ( lHeight > 0)
{
//DoSomething;
if( myaverage->total == 0)
{
std::cout<<"\a"<<endl;
}
//DoSomething;
}
Thanks a lot!
BM |
|
|
| Back to top |
|
|
|
| Wayne A. King... |
Posted: Sat Sep 19, 2009 12:04 pm |
|
|
|
Guest
|
On Sat, 19 Sep 2009 18:53:03 +0200, "bm1968 at (no spam) gmx.net" <bm1968 at (no spam) gmx.net>
wrote:
Quote: Compiler says "Missing
";" before '&&' and when I click the error, it points to the first line
of the code below
Look at the *preceding* line(s) for a missing semi-colon.
- Wayne
- Wayne A. King
wayne_a_king at (no spam) rogers.com |
|
|
| Back to top |
|
|
|
| Bo Persson... |
Posted: Sat Sep 19, 2009 12:27 pm |
|
|
|
Guest
|
bm1968 at (no spam) gmx.net wrote:
Quote: Sorry, I have an absolute newbie question...
Can you please tell me what I'm doing wrong here? Compiler says
"Missing ";" before '&&' and when I click the error, it points to
the first line of the code below
if ( lLeft > 0 ) && ( lTop > 0 ) && ( lWidth > 0 ) && ( lHeight > 0)
The condition in the if-statement has to be enclosed in a set of
parenthesis.
Quote: {
//DoSomething;
if( myaverage->total == 0)
Just like here!
Bo Persson |
|
|
| Back to top |
|
|
|
|