llf123456 发表于 2020-10-3 19:54:53

求大佬帮帮我

#include <stdio.h>
int main()
{
      int shuzi = 7, shuzi2 = 3, shuzi3 = 0;
      shuzi3 = shuzi1;
      shuzi1 = shuzi2;
      shuzi2 = shuzi3;
      return 0;
} 请问为什么第五行导致了运行错误

xy20ee 发表于 2020-10-3 19:58:37

int shuzi = 7, shuzi2 = 3, shuzi3 = 0;

//shuzi1去哪讷!

昨非 发表于 2020-10-3 19:59:55

#include <stdio.h>
int main()
{
        int shuzi1 = 7, shuzi2 = 3, shuzi3 = 0; //你这里shuzu少打了个一
        shuzi3 = shuzi1;
        shuzi1 = shuzi2;
        shuzi2 = shuzi3;
        return 0;
}

风过无痕1989 发表于 2020-10-3 21:01:16

你定义了 shuzi ,没有定义 shuzi1,而你却又要将 shuzi1 赋给 shuzi3,故此造成错误
页: [1]
查看完整版本: 求大佬帮帮我