CS50复数:返回2在源代码中是什么意思?

时间:2020-06-04 22:16:27

标签: c return return-value cs50

我只知道并理解返回值1和0。为什么在下面使用返回值2?

if (candidate_count > MAX)
{
    printf("Maximum number of candidates is %i\n", MAX);
    return 2;
}

在某些情况下,我还看到return -1。有人可以解释为什么使用它吗?

0 个答案:

没有答案