Author Topic: How to Compile and Run my first C++ program?  (Read 29774 times)

Offline niladri

  • Single posting newcomer
  • *
  • Posts: 2
How to Compile and Run my first C++ program?
« on: July 03, 2009, 04:58:37 pm »
First time in C++ ....!!

Using Code::Block 8.02,  My O/S Windows XP Professional

Created the following file :-

#include <condefs.h>
#include<isostream.h>
#include<conio.h>
pragma hdrstop

int main(int argc, char **argv)
{
    cout << "Hello World!" << end1;
    cont << end1 << "101 Press any key to continue...";
    getch();
    return 0;
}

1. Saved as hello.cpp
2. Clicked 'Build' then ''Run' tried ('Build & Run') - on the upper lest menu bar.

nothing happens.....!!!  What do I need to do?  File name is hello.cpp (in Windows XP o/s) is correct?
First time in C++ need help...

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: How to Compile and Run my first C++ program?
« Reply #1 on: July 03, 2009, 05:28:09 pm »
Look at the Buildlog:

Are there some error or warnings?

Offline niladri

  • Single posting newcomer
  • *
  • Posts: 2
Re: How to Compile and Run my first C++ program?
« Reply #2 on: July 03, 2009, 05:46:27 pm »
hi:
Please see the attached page:-

Following Error msg shows:-

"C++ Proj - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.

THis what I select:-

File -> New -> Project -> Console App -> C++ (language). Then
put the Project name and location.

I tried to run the template main.cpp and my code hello.cpp. Both gives the same error:-

"C++ Proj - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.

« Last Edit: July 06, 2009, 08:00:21 am by MortenMacFly »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: How to Compile and Run my first C++ program?
« Reply #3 on: July 03, 2009, 05:55:52 pm »
hi:
Please see the attached page:-

Following Error msg shows:-

"C++ Proj - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.

THis what I select:-

File -> New -> Project -> Console App -> C++ (language). Then
put the Project name and location.

I tried to run the template main.cpp and my code hello.cpp. Both gives the same error:-

"C++ Proj - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.



Search the forum for "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" or the full error message.

And always: please search before you ask questions that are answered many, many times.

Topic locked, because you obviously did not even read the IMPORTANT! BEFORE ASKING FOR HELP thread at the top of the Using Code::Blocks sub-forum.