Guided Class Introduction to Code::Blocks
What is a C program? You may have heard that a compiler is a program or tool that transforms a source program written in a high-level programming language, such as C, into a language that the computer can “understand,” called an executable program. So a compiler is essentially a translator, and this translation process is called compilation.
To facilitate the development and compilation of a C, Code::Blocks offers an environment that integrates a text editor with a compiler for the C language. The compiler used by Code::Blocks is famous (Wow!) GCC ( Gnu C Compiler ).
On Windows, there are basically two types of user programs:
- for console applications ( Applications console ), which are performed in a text window (also known as MS-DOS Prompt ); and
- Graphics applications ( GUI Applications ), using windows, menus, and other visual elements as part of their interface with the programmer.
All the C programs we’ll make will be console applications.
The Code:: Blocks is “ Free Software ” (under GNU General Public License ). This means, among other things, that it can be distributed and copied at will.
You can copy Code::Blocks from the page.
The purpose of this guided class is to help you get your first contact with Code::Blocks. This class covers a tiny part of the resources available on computers. It is up to you to consult the manuals with more detailed information to broaden your knowledge. By the end of this class, you should be able to:
- write programs via Code::Blocks ;
- compile and run programs with Code::Blocks; and
- save and reuse files in the Pró-Aluno room.
The class consists of two parts. The first one teaches you how to create a file containing a program, compile and run it using a straightforward “Hello World” program (as they say in slang). In the second part, you will create a more complex program to get to know other Code::Blocks features.
If you have installed Code::Blocks on your personal computer, you can take this practice class at home. In this case, only the folder names can be different.
To use the computers, you need a registration consisting of a username ( user name ) and a password ( password ). This guided class assumes you have an account and password.
If you are not yet registered to use the computers, ask the monitor responsible for the room to open a session for you.
It is not allowed to leave (or, as they say, save) files on the computers. All files you use during a session are deleted when another student opens another session on the same computer. This way, when you use the Pro-Aluno room, bring a keyring ( pen drive ) to save your programs.