how to compile .cpp file

dizyn's Avatar, Join Date: Jun 2007
Newbie Member
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.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Which compiler you are trying your hands on?
dizyn's Avatar, Join Date: Jun 2007
Newbie Member
gcc
DaWei's Avatar, Join Date: Dec 2006
Team Leader
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>