944,103 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1566
  • C++ RSS
Sep 17th, 2005
0

substitute of semicolon

Expand Post »
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??
Similar Threads
SpS
Reputation Points: 70
Solved Threads: 32
Posting Pro
SpS is offline Offline
598 posts
since Aug 2005
Sep 17th, 2005
0

Re: substitute of semicolon

MACROS? What does this acronym stand for?

Use an empty while loop.
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is offline Offline
2,479 posts
since Jun 2005
Sep 17th, 2005
0

Re: substitute of semicolon

[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!).]
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Sep 17th, 2005
0

Re: substitute of semicolon

Use a different programming language
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is offline Offline
2,479 posts
since Jun 2005
Sep 17th, 2005
0

Re: substitute of semicolon

Quote originally posted by Rashakil Fol ...
Use a different programming language

Nice Answer :lol:
SpS
Reputation Points: 70
Solved Threads: 32
Posting Pro
SpS is offline Offline
598 posts
since Aug 2005
Sep 17th, 2005
0

Re: substitute of semicolon

Quote originally posted by Rashakil Fol ...
Use an empty while loop.
empty while loop did worked but stuck into infinite loop

C++ Syntax (Toggle Plain Text)
  1. while(cout<<"Hello World")
  2. {
  3. }
SpS
Reputation Points: 70
Solved Threads: 32
Posting Pro
SpS is offline Offline
598 posts
since Aug 2005
Sep 17th, 2005
0

Re: substitute of semicolon

Try

C++ Syntax (Toggle Plain Text)
  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
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: managed c++ - managing a string
Next Thread in C++ Forum Timeline: Just Starting. Confused.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC