Hello World!

problems grrr....

Page 1 of 1

5 Replies - 563 Views - Last Post: 16 June 2010 - 06:33 PM Rate Topic: -----

#1 imaboneu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 13-June 10

Hello World!

Posted 14 June 2010 - 09:06 PM

Ok I'm sorry I'm so new to this guys but I just started reading up on some programming in C++ and trying to remember it all so I started from the begining... The program compiles but it wont stay up it just flashes... Anyone know how I can get it to stay up until I close it? Heres the code...
// 'Hello World!' program

#include <iostream>

using namespace std;

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



Is This A Good Question/Topic? 0
  • +

Replies To: Hello World!

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,883
  • Joined: 10-May 07

Re: Hello World!

Posted 14 June 2010 - 09:08 PM

This is a commonly asked question & the answer is available in the FAQ.

View Postimaboneu, on 14 June 2010 - 10:06 PM, said:

Anyone know how I can get it to stay up until I close it?

Rather than running the program from the OS (via double click or however you are running it) I would open a console & manually type the program name. Thus when it's finished it returns you to the prompt & doesn't close standard output. However in the provided link above you will find many example solutions. One of them will be suitable for your situation, I assure you :)
Was This Post Helpful? 0
  • +
  • -

#3 imaboneu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 13-June 10

Re: Hello World!

Posted 14 June 2010 - 09:12 PM

Yes and thank you... I used the "std cin.get();" line and it worked out perfectly... Thanks again and sorry for being such a noob at this stuff agian... Mad at myself for letting me forget everything about this stuff...
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,883
  • Joined: 10-May 07

Re: Hello World!

Posted 14 June 2010 - 09:17 PM

Don't let it get you so down :P Regardless of what anyone tells you, we were all beginners.
Was This Post Helpful? 1
  • +
  • -

#5 imaboneu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 13-June 10

Re: Hello World!

Posted 16 June 2010 - 06:31 PM

It's just personaly frustrating to me because I used to be really good at programming when I was younger then got kicked out and left my computer there and kinda fell away from programming... Now I just play alot of WoW and I'm trying to get back into making games... Alot to re-learn... But thx ...
Was This Post Helpful? 0
  • +
  • -

#6 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: Hello World!

Posted 16 June 2010 - 06:33 PM

Don't let no2pencil lie to you. I've heard he was born an expert in all languages, and even some that we haven't created yet.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1