[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



//What am I doing wrong???
//Compile command: "gcc a.c b.c -o a.c"


/***************contents of "a.c"*****************/
#include <stdio.h>
#include "b.h"

FILE *f;
int main(void) {
	f=fopen("/var/file","w");
	module();
	fclose(f);
}


/***************contents of "b.c"*****************/
#include "b.h"

void module(void) {
	fprintf(f,"data");
}


/***************contents of "b.h"*****************/
void module();
extern f;