I have two header files:a.h and b.h. I want to use only one of them, based on some condition. How can I do this?
Here some code:
main.c:
#include<stdio.h>
#include"a.h"
#include"b.h"
main() {
test();
system("pause");
return 0;
}
a.h:
#ifndef A_H
#define A_H
#include<stdio.h>
void test();
#endif
a.c:
#include "a.h"
void test() {
printf("Got tested from a.\n");
}
b.h:
#ifndef B_H
#define B_H
#include<stdio.h>
void test();
#endif
b.c:
#include "b.h"
void test() {
printf("Got tested from b.\n");
}
As I've said before,I only want to use one of them.How can I do this?