O'Reilly logo

Sams Teach Yourself C++ in 21 Days , Fifth Edition by Bradley Jones, 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

Day 15. Special Classes and Functions

C++ offers several ways to limit the scope and impact of variables and pointers. So far, you’ve seen how to create global variables, local function variables, pointers to variables, and class member variables.

Today, you will learn

• How to share information across objects of the same type

• What static member variables and static member functions are

• How to use static member variables and static member functions

• How to create and manipulate pointers to functions and pointers to member functions

• How to work with arrays of pointers to functions

Sharing Data Among Objects of the Same Type: Static Member Data

Until now, you have probably thought of the data in each object as unique to that object and ...

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