c - Xcode 在使用引用时不会编译 C 函数签名

标签 c xcode function reference

今天在大学里,我想做一些 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/

相关文章:

c - 为什么我的表函数中的计数变量没有增加?

Ruby 递归函数

c - 在 Windows C 中获取与真实硬件以太网 Controller 关联的 IP 地址

c - 需要就地反转文件,但它只适用于一行文件

swift - 在 Swift 上将 UIButton 添加到 UIScrollView 中的 UIImageView

xcode - 我的 Xcode 项目是如何从 iOS 项目更改为 OSX 项目的?

function - scala匿名函数问题

c++ - 按升序排列的 vector 元素

c - 使用 C 在 Linux COM 上进行 XBee 串行通信

ios - 类型 '(Class) -> () -> (Class)' 的值没有成员 'variable'