Ok we already know how to use Code::Block , here I will show you to use gEdit (default for distros with Gnome with terminal plugin) ,
Reasons for choosing gEdit : lightweight , less cluttered , easy for eyes and that terminal plugin
Ok first we have install gEdit plugins :
sudo apt-get install gedit-plugins
(if you using Debian based distro)
Now activate that plugin in gEdit plugins menu.
Done , tada now you have an awesome text editor suited for competitive programming.
For compilling and debugging the program,
You can just right click on the terminal at the bottom and choose “Change Directory” to change to the current directory.
g++ <program_name> to compile a program
To run the program just do an
For debugging you can use gdb ,
sudo apt-get install gdb
While compilling use
-g flag and then
gdb a.out tada now you can debug properly