O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by 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

The #include, Character by Character

The first character is the pound symbol (#), which is a signal to the preprocessor. The job of the preprocessor is to read through your source code looking for lines that begin with #, and when it finds one, to modify the code as requested by that command. This all happens before the compiler sees your code.

include is an instruction that says, “What follows is a filename. Find that file and read it in right here.” The angle brackets around the filename tell the preprocessor, “Look in all the usual places for this file.” If your compiler is set up correctly, the angle brackets will cause the preprocessor to look for the file iostream.h in the directory that holds all the header files for your compiler.

The ...

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