02-20-2004, 07:20 AM
Okay, recently the discussion of multimodule programs in C came up...and I'm not sure I understand it completely.
Using Dev-C++, I'd make a new project. Here are my source files that I add to it:
And then I compile.
Is that right? I thought I'd have to put the #include of stdio.h and the prototype for print_blarg() inside a header file, and include it in main.c - but I was wrong.
Using Dev-C++, I'd make a new project. Here are my source files that I add to it:
Code:
/* main.c */
int main() {
print_blarg();
return 0;
}
Code:
/* second.c */
#include <stdio.h>
void print_blarg() {
printf ("Blarg!");
}
Is that right? I thought I'd have to put the #include of stdio.h and the prototype for print_blarg() inside a header file, and include it in main.c - but I was wrong.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
--------------------------------------
Freebasic is like QB, except it doesn't suck.