Chapter 2

Data, Variables, and Calculations

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • C++ program structure
  • Namespaces
  • Variables in C++
  • Defining variables and constants
  • Basic input from the keyboard and output to the screen
  • Performing arithmetic calculations
  • Casting operands
  • Variable scope
  • What the auto keyword does
  • How to discover the type of an expression

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter on the Download Code tab at www.wrox.com/remtitle.cgi?isbn=9781118368084. The code is in the Chapter 2 download and individually named according to the names throughout the chapter.

Get Ivor Horton's Beginning Visual C++ 2012 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.