Excuse me if this is a question for the Devc++ forum,
I"m currently working a project in DevC++. I have four files in the project.
obviously main calls the functions header but also calls <stdio.h>.
The functions.h only has the prototypes for the functions1 and functions2.c respectively. <stdio.h> is included again only in function1.c
My questions is two fold. in General how does the linking of different source files work? to my understanding the functions.h called from main is essentially bringing the functions into main. So why can I not have only one <stdio.h> in main. Why is necessary to include it in my function1.c file.
If becomes more confusing when I attempt to remove it from the function.c files and simply put it once in the header file. Also If i remove the <stdio.h> from fucntion1.c and put it in function2.c. i get an error saying my functions are undeclared, as if i never included <stdio.h> in any file.
Not coming from a linux background i'm not quite shure i have the know how in understanding this, since Dev automatically creates a makefile for me. again if this is the wrong forum let me know.