Numerics: use of Code::Blocks

The software installation is described elsewhere. The basic use of the compiler and command line is described for register machine programs elsewhere, and is exactly the same as for ordinary C++ programs. It is strongly recommended that you learn this first as it will help you understand the whole process of how compilation works. If you understand the principles and prefer to use the Code::Blocks IDE this page explains how to do this. Other IDEs will work in a similar way.

Code::Blocks looks daunting because it has so many buttons and settings but basic use (all that's needed for this course) is quite easy. Once Code::Blocks is installed correctly, start it up. You should see a three-pane editing window with menus and buttons. Then,

Your C++ source file will be saved every time you recompile, but you will have to save your project settings when you exit Code::Blocks.

Remark.

A possible problem for MS-Windows users, including users in computer labs is that if you do not close the console after it has run, or if is running and "hung in a loop", then the running console might prevent you making changes and recompiling your program. This is a Microsoft Windows "feature" (that originally arose as a bug-fix to a problem in MS-DOS 3.1) which we have been suffering from every since. Please make sure you close all consoles. This is by pressing a key at the end, or if you need to, by pressing control-C or clicking the X in the top right of the window.

To enable compiler warnings in Code::Blocks go to settings -> compiler -> Compiler Flags and look for "Enable all common compiler warnings" (-Wall). This will be saved in your project (but not in your source file).