Programming: Creating a Library (Header and .C File Containing the Functions) Using Programmers Notepad
Libraries are files containing code that can be used to extend the functionality of a program. In C and C++, these libraries are stored in header files and .C files. The library files are included in the main file using an #include statement.
The header information (generally the code above the main function that include the #define statements and function prototypes), and the functions are stored in the .c file. If desired, all of the code (header and functions) can be stored in the header file.
If a .c file library is created, any global variables that is used in the functions would be located in this .c file rather than the header .h file.
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.