Headers are a familiar sight that you may or may not know you've been working with. You've seen them in the form of iostream.h, stdlib.h, string.h, etc. There are technically two different types of headers: default and user created ones. The only difference is what you conventionally surround them with. Default headers are typically surrounded with <> signs, as you've seen, and user defined headers are surrounded with "". This is mainly cosmetic; they all work no matter which you surround them with.

That said, creating your own headers is extremely simple. At the top of the file, you place these two lines of code.

#ifndef _FILENAME_H
#define _FILENAME_H

Where FILENAME equals the name of the file. These are called precompile commands. They execute before the program actually starts; you can't decide to use one at runtime. The first line is basically an if statement deciding whether _FILENAME_H has been defined. If it has, it will skip down to the line below. If it hasn't, it'll go ahead and define the file. The following should go at the end of the file. It is the "closing bracket" in the if statement.

#endif

Now on to the content of the header files. You can place absolutely anything in this file, though you generally want it to be self contained. If it uses the string.h header, go ahead and include it in the file (below the #define statement). This is simply a means of making your larger programs easier for you to deal with. You can separate similar blocks of functions or even classes into their own files for easy access.

The only other thing you have to know is to save the file as the same name you placed FILENAME with, and remember to give it the .h extension.