Programming in C++ requires a text editor and a compiler. A text editor is something to write code in, and a compiler is a program to assemble code into a form that can be executed. A compiler examines source code and checks for errors, such as misspellings. If the source code is correct, the compiler assembles it into what is known as object code, which is something a computer can understand.
Nowadays, programmers don't need to write their code in a basic text editor and compile the application separately. Most versions of C++ are available as an integrated suite of tools, complete with text editor and compiler together. And this means source code, once it's written, can be compiled at the touch of a button. In short, a modern-day C++ suite includes everything required to produce programs that run out of the box. These developmental suites are often called integrated development environments (IDEs). Just as a word processor like Microsoft Word or OpenOffice Writer is used to produce documents, so a C++ IDE is used to produce programs with C++.
There are a large number of IDEs available, manufactured by different companies for different platforms and different standards, such as Windows, GNU/Linux, Mac, etc. One of the most well-known IDEs is Microsoft Visual Studio .NET, aimed primarily at the Windows platform. In general, most PC games are developed for the Windows platform because statistics show most home users likely to play games have at least a Microsoft Windows operating system. Even so, other platforms have a growing games market. The following subsections examine some of the available IDEs.
Due to the diversity and great variation of operating systems, from Windows to the plethora of GNU/Linux distributions-like Debian, Fedora Core, and Ubuntu-I shall throughout subsequent chapters of this book attempt to maintain neutrality toward platform and technology such that the principles I explain can be employed for whatever operating systems and IDE the reader chooses. However, throughout the writing of this book and in presenting examples I have in each case used the Windows platform and Code::Blocks. This is primarily because at the time of writing it's likely to be the platform most readers will be using too. But this should not be taken as a recommendation or preference for any one platform or IDE over another.
Visual Studio .NET is one of the most prevalent IDEs in use today and makes a developer's life simpler in a number of important ways. Many of the code samples developed for this book were coded in Visual Studio .NET, and many games are also developed with this IDE. However, Visual Studio .NET is for the Windows platform only, and it tends to be pricey compared to others.
Code::Blocks is a more recent development. It's a free, cross-platform (Windows and GNU/Linux) C++ IDE that offers a great variety of features. I recommend giving it a try. It can be downloaded from http://www.codeblocks.org. (See Figure 4.2.)
Dev C++ is another good C++ IDE that's free. This can be downloaded from http://www.bloodshed.net/download.html. (See Figure 4.3.)