Chapter 14

Other Numerical Variable Types

In This Chapter

arrow Reviewing the limitations of integers

arrow Introducing real numbers to C++

arrow Examining the limitations of real numbers

arrow Looking at some variable types in C++

arrow Overloading function names

The programs so far have limited themselves to variables of type int with just a few chars thrown in. Integers are great for most calculations — more than 90 percent of all variables in C++ are of type int. Unfortunately, int variables aren’t adapted to every problem. In this chapter, you see both variations of the basic int as well as other types of intrinsic variables. An intrinsic type is one that’s built into the language. In Chapter 19, you see how the programmer can define her own variable types.

remember.eps Some programming languages allow you to store different types of data in the same variable. These are called weakly typed languages. C++, by contrast, ...

Get Beginning Programming with C++ For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.