I've seen you all working with multiple source files and I want to do it too!
Now how do I link them together? I mean do I have to add something in main.c to include the other two files or what and how to do that? I am using command line to compile.
Someone told me to do
And some other random guy told me toCode:gcc main.c function1.c function2.c -o executable
in main.c But both give me 200 errors (probably some of them are syntax errors)Code:#include "function1.c" #include "function2.c"
Anyway, which is the correct way to do this?