Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Absolute newbie question

0 views
Skip to first unread message

bm1...@gmx.net

unread,
Sep 19, 2009, 12:53:03 PM9/19/09
to
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

Wayne A. King

unread,
Sep 19, 2009, 2:04:59 PM9/19/09
to
On Sat, 19 Sep 2009 18:53:03 +0200, "bm1...@gmx.net" <bm1...@gmx.net>
wrote:

>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_...@rogers.com

Bo Persson

unread,
Sep 19, 2009, 2:27:36 PM9/19/09
to
bm1...@gmx.net wrote:
> 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


0 new messages