O'Reilly logo

C++ All-in-One For Dummies, 3rd Edition by John Paul Mueller, Jeff Cogswell

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

Chapter 2

Creating Data Structures

In This Chapter

arrow Discovering all the different data types

arrow Casting and converting

arrow Using structures with your data

arrow Comparing and manipulating structures

C++, being a computer language and all, provides you with a lot of ways to manipulate data — numbers, letters, strings, arrays — anything you can store inside the computer memory. To get the most out of C++, you should know as much as you can about the fundamental data types. This chapter covers them and how to use them.

In this chapter, we refer to the ANSI standard of C++. ANSI is the American National Standards Institute. The information we provide in this chapter deals with the ANSI standard (singular) of C++. Fortunately, the GNU gcc compiler that comes with Code::Blocks is ANSI-standard-compliant. (Little nuances show up, but not often.)

Working with Data

In the sections that follow, we tell you how you can manipulate your data, discuss the types of data available to you, and point out how you can change them.

The great variable roundup

The ANSI C++ standard dictates these fundamental C++ types: ...

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