The Usual C++ Header Files

Part of the C++ All-In-One For Dummies Cheat Sheet

In C++, a header file holds forward declarations of identifiers. Here are some of the most common C++ header files that you’ll be using, along with their correct spellings. These aren’t by any means all of them, but they are the most common:

  • Include <string> if you’re going to be using the string class.

  • Include <iostream> when you want to use cout and cin.

  • Include <fstream> when you want to read or write files.

  • Include <iomanip> if you want advanced manipulator usage in your streams.

  • Include <stdlib.h> for general operations, including system(“PAUSE”).

Comments (0)

Leave a Reply


Post Comment

SERIES
C++ All-In-One For Dummies Cheat Sheet

Grab a free widget and we'll bring interesting & helpful tips to your favorite personal page each day

Sign Up for RSS Feeds

Computers & Software

Inside Dummies.com