Absolute newbie question

B

bm1968

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
 
W

Wayne A. King

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
(e-mail address removed)
 
B

Bo Persson

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.
{

//DoSomething;

if( myaverage->total == 0)

Just like here!


Bo Persson
 

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