how to compile .cpp file

Newbie Member
9Jun2007,16:15   #1
dizyn's Avatar
i have .cpp file which has hello world example in it.
i don't know how to compile it from command line
any help please
thanks.
Go4Expert Founder
9Jun2007,18:54   #2
shabbir's Avatar
Which compiler you are trying your hands on?
Newbie Member
9Jun2007,20:45   #3
dizyn's Avatar
gcc
Team Leader
9Jun2007,22:32   #4
DaWei's Avatar
Code:
#include <iostream>

int main ()
{
    std::cout << "Hello, World" << std::endl;
    return 0;
}
Quote:
Originally Posted by Command Line

E:\Dev-Cpp\progs>g++ helloworld.cpp

E:\Dev-Cpp\progs>a.exe
Hello, World

E:\Dev-Cpp\progs>