Author Topic: No Output  (Read 2805 times)

Whylucky

  • Guest
No Output
« on: May 25, 2011, 07:02:25 am »
Hi, i am new to programing and i got a dummies book. They use code::blocks and when i try to run the main program (the one that already exists when i installed Code::Blocks) i get no output. I have updated my C++ redist installs and the code is as follows,

#include <iostream>

using namespace std;

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


with a space after the bracket. I hit the "save everything" button, then build then run, and nothing happens. Is their anyone that can help me?

Offline hibbity

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: No Output
« Reply #1 on: May 25, 2011, 11:04:36 pm »
Did you try running the program from a command terminal.

From the command prompt (for example):

        cd /home/<username>/myproject/bin
        ./helloworld

Then you should see some output.