O'Reilly logo

C++ How to Program, Sixth Edition by H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

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 21. Bits, Characters, C Strings and structs

 

The same old charitable lie Repeated as the years scoot by Perpetually makes a hit—“You really haven’t changed a bit!”

 
 --Margaret Fishback
 

The chief defect of Henry King Was chewing little bits of string.

 
 --Hilaire Belloc
 

Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences.

 
 --William Strunk, Jr.

OBJECTIVES

In this chapter you’ll learn:

  • To create and use structs.

  • To pass structs to functions by value and by reference.

  • To use typedef to create aliases for previously defined data types and structs.

  • To manipulate data with the bitwise operators and to create bit fields for storing data compactly.

  • To use the functions of the character-handling ...

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