You are on page 1of 1

Chapter 2: Creating Your

First C++ Application


In This Chapter
✓ Organizing your applications into projects
✓ Typing code into the code editor
✓ Writing an application that writes to the screen
✓ Doing basic math
✓ Running your application

I t’s your lucky day. You have decided to learn the most popular program-
ming language on the planet. From the biggest skyscrapers housing huge
Fortune 500 companies all the way down to the garages with the self-starting
kids grinding out the next generation of software, people are using C++. Yes,
there are other languages, but more programmers use C++ than any other
language. In this chapter, you start right out writing a C++ application.

As mentioned in Chapter 1, this book relies on your use of Code::Blocks as


the IDE and on GCC as the C++ compiler. The procedures are written for the
most current version of Code::Blocks (version 12.11) at the time of writing,
so you may need to make allowances if you use a different Code::Blocks ver-
sion, and the procedures won’t work if you use another IDE. In addition, you
may need to make minor changes to the code as the examples become more
complex if you want to use other compilers.

Code::Blocks Creating a Project


Creating a computer application is usually a bigger job than you’d want
to organize in your head. Application code is saved in files much like the
documents in a word processor. But applications often have more than
one source-code file. At big companies in big buildings in big cities, some
applications are really big — hundreds of source-code files for just one
application.

You might also like