This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center 。
8年前关闭。
这是问题所在
然后:
8年前关闭。
这是问题所在
int main() {
int pid = fork();
if (!pid) {
// condition 1
} else {
// condition 2
}
return 0;
}
(!pid)
有什么作用? 最佳答案
它相当于:
if (!pid != 0) /* ... */
然后:
if (pid == 0) /* ... */
关于c - c语言中if(!variable_name)是什么意思,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13952423/