5. C++编译器不能以C语言的方式编译多个重载函数
错误代码示例:
#ifdef __cplusplus
extern "C"{
#endif
void f()
{
}
void f(int i)
{
}
#ifdef __cplusplus
}
#endif
int main()
{
return 0;
}
错误代码示例:
#ifdef __cplusplus
extern "C"{
#endif
void f()
{
}
void f(int i)
{
}
#ifdef __cplusplus
}
#endif
int main()
{
return 0;
}