Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,428 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,894 people online right now. Registration is fast and FREE... Join Now!




think on it

 
Reply to this topicStart new topic

think on it

oracle_4all
20 Jan, 2008 - 04:55 AM
Post #1

New D.I.C Head
*

Joined: 6 Jan, 2008
Posts: 2

can u print helloworld without using semicolon
User is offlineProfile CardPM
+Quote Post

#include<wmx010>
RE: Think On It
20 Jan, 2008 - 05:16 AM
Post #2

D.I.C Head
**

Joined: 19 Jan, 2008
Posts: 75



Thanked: 1 times
My Contributions
EDIT:::
You can try the following:
CODE

#include <iostream>

int main()
{
    if (std::cout << "Hello world!" << std::endl) //no using namespace std allowed because that would involve a semicolon
    {
    }

    //if there is no return at the end of main() the compiler returns 0 for you (still not good practice)
}


This post has been edited by #include<wmx010>: 20 Jan, 2008 - 06:18 AM
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/5/08 04:52AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month