今天在大学里,我想做一些 C 编码。我最终在 Linux 下编码,因为 Xcode 不允许我编译文件。
因为这可能是一个简单的(希望可以修复的)问题,所以我在一些函数签名中将其带到了要点:
void testfunc(int test);
void testfunc(int test, int* test2);
void testfunc(int test, int* test2, int** test3);
这 3 个将编译并工作! 但是使用
void testfunc(int test, int* test2, int** test3, char*& test4);
让 Xcode 认为这是不可能的。为什么? Linux 不会对此提示。
最佳答案
C 中不存在引用。您确定您没有在 Linux 下将其编译为 C++ 吗?
关于c - Xcode 在使用引用时不会编译 C 函数签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14945404/