substitute of semicolon

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

substitute of semicolon

 
0
  #1
Sep 17th, 2005
Is it possible to print---- hello world on the screen without using semicolon( ; ) anywhere in the code...i was able to do it through MACROS..but is there anyother way??
Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: substitute of semicolon

 
0
  #2
Sep 17th, 2005
MACROS? What does this acronym stand for?

Use an empty while loop.
Quick reply to this message  
Join Date: Apr 2004
Posts: 4,342
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 237
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: substitute of semicolon

 
0
  #3
Sep 17th, 2005
[Oooooh, when will these questions cease to poison new programmers...?]

Yes. Hone your Googling skills if you are out of hints. [Bonus: Google the groups. Don't make me mention comp.lang.c (ooops!).]
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: substitute of semicolon

 
0
  #4
Sep 17th, 2005
Use a different programming language
Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: substitute of semicolon

 
0
  #5
Sep 17th, 2005
Originally Posted by Rashakil Fol
Use a different programming language

Nice Answer :lol:
Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: substitute of semicolon

 
0
  #6
Sep 17th, 2005
Originally Posted by Rashakil Fol
Use an empty while loop.
empty while loop did worked but stuck into infinite loop

  1. while(cout<<"Hello World")
  2. {
  3. }
Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: substitute of semicolon

 
0
  #7
Sep 17th, 2005
Try

  1. #include <iostream>
  2.  
  3. int main(){
  4. while((std::cout << "Hello World"<< std::endl) == 0){}
  5.  
  6. }

I would assume that like most things cout would return a +ive int if it has success
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC