mycommon.h
enum boolean {
false,
true
} status,flag;
void printIntArray(int *p,int len,int isPrint){
int i;
if(isPrint){
for(i=0;i<len;i++,p++){
printf("%d\t",*p);
}
}
printf("\n");
}
test.c
#ifndef MYCOMM_FUNTION_A
#define MYCOMM_FUNTION_A
#include <stdio.h>
#include "mycommon.h"
#include "test1.c"
#endif
void main(){
int a[]={1,2,3,4,5};
printIntArray(a,5,true);
add(a,5);
}
test1.c
#ifndef MYCOMM_FUNTION_A
#define MYCOMM_FUNTION_A
#include <stdio.h>
#include "mycommon.h"
#endif
void add(int *p,int len){
printIntArray(p,len,false);
}