Saturday, November 22, 2008

How To Do C and C++ Programming in Ubuntu 8.10 Linux

Open console and type:

sudo apt-get install g++ g++-4.2

If you want an IDE like Turbo C in windows:


sudo apt-get install geany

GEANY is a good C programming Integrated Development Environment (IDE) in Linux like turbo c in windows. Take geany from Programming tab.

If you don't want an IDE you must use console to compile your program. Enter the program in a text editor. Save it with extension .c 0r cpp.

To compile a C or C++ Program.

open terminal

Then go to the directory using cd command. Type:

g++ fileaname.c or g++ filename.cpp



No comments: