When I have more than one source files do I need then declare all others files functions in main file with extern. And I can`t understand how to use the class what is made in other file. Then extern dosn`t help anymore.
When I have more than one source files do I need then declare all others files functions in main file with extern. And I can`t understand how to use the class what is made in other file. Then extern dosn`t help anymore.
Code:#include "file.c" int main(void) { //main function is only in this file //the other functions are in file.c //you can use them as if they were //in this source file though return 0; }
Thanks for answering but that was not what I mean.
h fails and source fails are two different things.
In you code there are h fail with name c.
I mean another file what is compiling separatly.