Code:
Main.cpp - err, C
#include "myhead.h"
int main()
{
MESSAGE("Line 2 n stuff");
}
- myhead.h -
#include <stdio.h>
#include <conio.h>
#include <io.h>
#include <stdlib.h>
#include <time.h>
#include <myfuncs.h> //clearing screen, and force full screen
#define MESSAGE(x) clrscr(); printf("Line 1\n%s\nLine 3", x)
I can replace "line" 2 from any function, or source file by calling MESSAGE("My new stuff goes here").
Code:
Sub source file
#include "myhead.h"
int blah_message()
{
printf("\n\nBlah");
}
Is there a way to make the compiler automatically link all of your source files? Do you do it with a make file? Please excuse such a newbie of a question, but I want to put in the effort before hand, so once things get going, they roll faster. Modularization.
BTW, also excuse my huge include list - it came from another program...and I have alot of things happening right now.