You are not logged in. Please login at to post your questions!


How to use Code::Blocks ?

So I want to ask the following questions on how to use code::blocks -

  1. How do we use code::blocks with linux terminal?
  2. How do we submit a problem on codechef by coding on code::blocks? (Currently I am using the codechef ide)
  3. 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?

asked 26 Nov '16, 00:18

mathecodician's gravatar image

accept rate: 7%

  1. Start a new project in Code::Blocks.
  2. Choose File→New→Project.
  3. Choose Console Application and click Go.
  4. Choose C/AnyLang and click Next. 5.Type the project title.

  5. Click the Next button.

  6. So far, these first few steps are the same as for creating any C language console program in Code::Blocks.
  7. Place a check mark by the Create “Debug” Configuration.

8.The Debug setting allows a program to be created with special debugging information included.

9.Ensure that the item Create “Release” Configuration is also selected.

10.Click the Finish button.

The new project appears in Code::Blocks.

Type your code and click on any line number on the left to set breakpoint



And click on the next button to run through the code step by step


answered 26 Nov '16, 00:35

swetankmodi's gravatar image

6★swetankmodi ♦♦
accept rate: 15%

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.

alt text

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

alt text

To run the program just do an ./a.out

alt text

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

alt text


answered 30 Nov '16, 23:34

mz54's gravatar image

accept rate: 30%

@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.


answered 26 Nov '16, 20:52

teracoder's gravatar image

accept rate: 9%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 26 Nov '16, 00:18

question was seen: 1,385 times

last updated: 30 Nov '16, 23:34