A header file needs a mechanism to only allow the code to compile once, even if the header file is included in other files more than once. The #ifndef is used for this purpose.
Usage:
#ifndef uniqueName
#define uniqueName
//Code to be compiled only once
#endif
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.