【Xcode】sh: pause: command not found system("pause"); 只适合于DOS和Windows系统,不适合Linux系统。 直接删掉就可以。 或者改为: #include <unistd.h> pause();