By Sergey Skudaev
Download Code Blocks: http://www.codeblocks.org/downloads/binaries.
Select the "codeblocks-16.01mingw-setup.exe" link to download executable with the GCC/G++ compiler and GDB debugger from TDM-GCC. There is an instruction for the installation, so you should not have any problems.
Let us create the same application using Code Blocks open source IDE. When you start the Code blocks application the window below is displayed.
Figure 12. The Code::Blocks IDE.
Click Create a new project link. On the next window select the Console application and click the Go button.
Figure 13. Select a project type.
The console application window is displayed with options for C and C++.
Figure 14. Select C++ and click the Next button.
Figure 15. Enter project name, select a blank tree folder.
Click the Next button. Select a GNU GCC Compiler in the compiler drop down list and click the Finish button. See Figure 16.
Figure 16. Selecting a Compiler.
The project is created. Select the project and open the main.cpp file.
Figure 17. A simple console application.
Enter a code the same as the code in Figure 18.
Figure 18. A simple C++ program that draws a tree.
Save the file by clicking the Save icon on the main tool bar.
Figure 19. Run the program.
From the main menu select Debug, Start and your code will be compiled.
Figure 20. The Tree program output.
Click Yes to agree to rebuild the project. The bottom of the window will display errors if any. Now you know how to use Code Blocks IDE.