Prototype functions are a requirement in C++. Prototypes are commonly (and should) be placed within header files. The use of header files is encouraged as it brings clarity to the table (so to speak).
Adding to what Athar said, libraries require a header which is used as an interface to the functions within. Without that header (s), you won't be able to call the functions within the library.
I think the main point of a header is to let you share variables between two main files. Now just make a myHeader.h and place it in the same directory as your .cpp file. You can now put all of your global variables and classes here.
1 2 3 4 5 6 7 8
#include "myHeader.h"
int main()
{
do_something();
}
javascript:editbox1.editSend()
I think the main point of a header is to let you share variables between two main files. Now just make a myHeader.h and place it in the same directory as your .cpp file. You can now put all of your global variables and classes here.