一个简单但不容易想明白的问题!精通c的请进!
假设有四个文件:main.c main.h other.c other.h
main.c 中有#include "main.h"
main.h中有#include "other.h"
other.h中有 int max(int,int);
other.c 中有 #include "other.h"和函数体int max(int a,int b){return a;}
现在编译 main.c 后生成main.exe不能使用other.c中的max方法,怎么才能让main中可疑使用max方法.
(不能用在other.h中建类,不能把方法体移到other.h中,有什么别的方法么?比如"宏",配置文件之类方法??)
谢谢了!