O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Third Edition by Brian Overland

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

E. ASCII Codes

This appendix presents ASCII codes according to decimal value, hexadecimal value, and corresponding character. Hexadecimal codes can be used to embed values into a string. You can also print characters by using a (char) cast. For example:

cout << "Hex code 7e is " << "\x7e" << endl;// Print ASCII codes from 32 to 42.for (int i = 32; i <= 42; i++)    cout << i << ": " << (char) i << endl;

Some nonprintable characters have special meanings:

Image NUL: null value

Image ACK: acknowledgment signal (used in network communications) ...

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