Chapter 2. Exploring C++ Data Types, Variables, and Constants

  • Explore the fundamental data types

  • Get acquainted with derived data types

  • Learn to use variables and constants antonyms from the thesaurus

  • Discover how to resolve the scope of variables and constants

  • Understand declarations and definitions

  • See how to cast data types


Understanding C++ Data Types

At its most basic level, a computer program performs an operation on some data and produces a result. Because C++ is a strongly typed language, each piece of data—that is, each data element—must have a specific data type. Technically speaking, a data type describes a set of values and the operations that can be applied to that set. In layman’s terms, a data type determines how the ...

Get Practical C++ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.