If we had a file called example.h at the top of the file simply put
#ifndef _EXAMPLE_H_
#define _EXAMPLE_H_
All your code
#endif
The tag _EXAMPLE_H_ is just an abstract name but it is useful to make it a name which makes sense, so this is the format I use.
This prevents multiple declarations and allows you to declare classes in the .h file which is the best place to put them for external use.