Re: While loop style
- From: "Nishant Sivakumar" <nish@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 11:07:51 +0530
Alternatively, you could use for :-
for(; queue.remove(); )
; // empty
--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com
"Charles Tam" <CharlesTam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DAF56A25-FB5B-4F8E-A347-D0BD2F60FCD2@xxxxxxxxxxxxxxxx
> I've a while loop as below, and would like to execute the true expression
> until false. Is my style of ";" correct?
>
> FYI: queue.remove() returns true if element is removed, false if queue is
> empty. Note, the queue do not provide a isEmpty funtion.
>
> ////////////
> while ( queue.remove() )
> {
> ;
> }
> ////////////
>
.
- Follow-Ups:
- Re: While loop style
- From: Roy Fine
- Re: While loop style
- References:
- While loop style
- From: Charles Tam
- While loop style
- Prev by Date: Re: Class templates and friend function templates
- Next by Date: Re: How to get the physical device name of dynamic volume in dynamic disk?
- Previous by thread: RE: While loop style
- Next by thread: Re: While loop style
- Index(es):
Relevant Pages
|