So I want to ask the following questions on how to use code::blocks -
How do we use code::blocks with linux terminal?
How do we submit a problem on codechef by coding on code::blocks? (Currently I am using the codechef ide)
How do we debug on code::blocks? I have seen people clicking some buttons and the next step executed, so this helps them debug. Is this feature available on code::blocks? If yes then how to use it?
@mathecodician@swetankmodi has told about how to use Code::Blocks, to submit, just click upload file after saving on CodeChef, locate your file and submit.
Though I’d recommend not using any IDE for practice for contests like IOI as over there you may not be getting a good IDE, so you should practice with only a terminal and Vim, though this seems to be difficult at first, getting used to this means no matter what you get on spot, you’ll be good to go.
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.
Then g++ <program_name> to compile a program
To run the program just do an ./a.out
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