O'Reilly logo

Sams Teach Yourself C++ in 24 Hours, Third Edition by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 3. Variables and Constants

Programs need a way to store the data they use. Variables and constants offer various ways to work with numbers and other values.

In this hour you learn:

  • How to declare and define variables and constants

  • How to assign values to variables and manipulate those values

  • How to write the value of a variable to the screen

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required