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.
Then go to the directory using cd command. Type:
g++ fileaname.c or g++ filename.cpp