是否可以让程序参数在 xcode 中工作?我正在为大学做作业,并想使用 xcode 中的调试器来帮助我了解发生了什么。
我知道代码至少是可编译的,因为我能够用 gcc 编译它,但是 xcode 不能识别语法。
我试图在 xcode 中运行的代码是:
#include <stdlib.h>
#include <stdio.h>
int main() {
int a = 50;
int b = 100;
void P(int *c, void R(int)) {
void Q(int p) {
printf("%d\n", p);
R(p+100);
}
if (a == b) R(b);
else {c = c + 25;
P(c, Q);
}
}
void Q(int p) {
printf("%d\n", p);
}
P(&a,Q);
}