hi everyone
i have seen many noobs asking for a good IDE for c and c++ when they switch to ubuntu.\
here is one of rhe easiest solution for their problem
requirements :
1) a text editor...you can use gedit,vi editor ,nano or kate.. a noob should look for gedit or kate...they are gui based
2) gcc and g++ compiler.. gcc is used for compiling your c codes .one can also use it for assembling assembly level codes though some modifications are required. g++ is compiler for c++
how to get gcc or g++
gcc and g++ gets installed when you run this command
Code:
sudo apt-get install packagename
now to get the name of the package . on terminal type gcc or g++ which ever compiler you want. you will get a list of packages(if that compiler is not installed) install the compiler

how to code

open a text editor and write your code

here i give an example of simple c++ hello world code

#include <iostream>
using namespace std;
int main()
{
cout<<"hello world"<<endl;
}

save it to the directory you want. if you save in home directory no need of changing your directory while compiling and executing but if you changed in some other directory change your directory to that particular directory using cd directory_path

first compile it

to compile type g++ filename

vivek@NEO:~$ g++ hello.cpp
vivek@NEO:~$

alternatively if your file in not in your home directory and you havent changed directory to the on where your file is ,you can compile as

g++ path_to_file
vivek@NEO:~$ g++ /home/vivek/codes/hello.cpp


if no error you will again get a prompt

to run or execute use
./a.out

vivek@NEO:~$ ./a.out
hello world
vivek@NEO:~$

similarly for c instead of g++ use gcc..