Compiling your first C++ program
If you want to run c++ program follow this procedure
g++ is the compiler that you must use.
you should use a .cpp file extension rather than a .c one
You need to create a file
sudo gedit first.cpp
add the following lines save and exit the file
Run your C++ Program using the following command
g++ first.cpp -o test
./test
Output should show as follows
Hello World!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment