FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Writing your first C++ Program




In writing your first C++ Program, you need the following:

1. C++ Compiler (DevCPP, Visual Studio)
2. C++ code

If you already have the compiler, install and run it.

write this code

//------------------------------------------------
#include <iostream> // required if you have input and ouput
using namespace std; // required since you will be using cout

int main() { // required since every c++ program start with a main function
cout << "Hello World"; // this will display hello world in the screen
system("pause"); // run the dos command pause to temporary pause in the screen
}

compile and run it using your c++ compiler.

enjoy Smile



1 blog comments below

I think that is first program everyone does with any programming language.
standready on Thu Dec 29, 2011 10:50 pm



FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.