原因:某个地方缺少分号 如: void print(int a) { int b ///wrong here std::cout << a << std::endl; } 解决:重点排查报错行前几行的变量声明等。