Hello. I study C.
Question is already in the post title.
I know that header files, such ones that I write, can be used for calling eg functions from an external file.
Is that true? What is the makefile then?
I am asking what is the difference and when should I use which one? (header file / makefile)
I have learned online that there is a difference in the code:
for the header:
Code:
#include "header.h"
int main () {
test();
return 0;
}
and for the makefile:
Code:
#include <hellomake.h>
int main()
{
myFunction();
return(0);
}
some links:
A Simple Makefile Tutorial
https://en.wikipedia.org/wiki/Include_directive
https://en.wikipedia.org/wiki/Makefile
Thank you.