Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cybersniper

OK

This topic is 5672 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I now have the Borland C++ builder 6, I looked at all the tutorials but I still don''t no what to do I did the //my first program in C++ #include <iostream.h> int main() { cout << "Hello World!"; return 0; } but nothing isn''t showing up could somebody please help me

Share this post


Link to post
Share on other sites
Advertisement
Ok so you are saying that I should type this

//my first program in C++

#include <iostream.h>

int main()
{
cout << "Hello World!"end1;

return 0;
}

Share this post


Link to post
Share on other sites
actually he meant:

cout << "Hello World!" << endl;
// notice the << before endl ?



"No lies of sugar can sweeten the sournes of reality"

}+TITANIUM+{ A.K.A. DXnewbie[onMIRC]

Share this post


Link to post
Share on other sites
No you should type:


  
#include <iostream.h>

int main()
{
cout << "Hello World" << endl;
return 0;
}


Note that that it is ENDL, just in lowercase.
And maybe you want to run it from the command line (start->run, type cmd (or command on win9x/me), press enter, switch to your progs folder using doscommands).
Alternative you can do a .bat file with the content:

exename.exe
pause

and run that bat file.
You can also put an input at the end of the program or system("PAUSE"); before the return 0;.

[My Lousy Page | Kings Of Chaos | Vampires | email.me]

Share this post


Link to post
Share on other sites
No, you should type:

        

#include <iostream>


int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}


:D

Edit: eek! nice catch Arkainium, cheers

Henrym
My Site

[edited by - henrym on February 10, 2003 2:37:06 AM]

Share this post


Link to post
Share on other sites
No, you should type:


  #include <iostream>

int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}




[edited by - Arkainium on February 8, 2003 5:31:57 PM]

Share this post


Link to post
Share on other sites
can you...

cout << "Hello World!" << flush;

?

I'm not at a comp with a compiler so...thanks

[edited by - kordova on February 8, 2003 10:56:50 PM]

Share this post


Link to post
Share on other sites
I would go
--------------------------------------------
#include <iostream.h>

int main()
{
cout << "Hello world!" << endl;

return 0;
}
--------------------------------------------

That should work. But that std::cout might have to do if you're using Borland. I don't know if it matters.

Try this:
--------------------------------------------
#include <iostream>
namespace std;

int main()
{
cout << "Hello world!" << endl;

return 0;
}
--------------------------------------------

If that don't work...I ain't gotta clue what you're doin. Maybe you're using your compiler incorrectly.

Moose

[edited by - moose_2006 on February 8, 2003 10:33:30 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!