GCC编译出错:
error:expected declaration or statement at end of input
在VIM中用ggVG= 对代码进行缩进,发现有一个函数的缩进不对,顺个这个函数往上找到一处缺少一个"}"。
本文介绍了使用GCC编译过程中遇到的一个典型错误:“expected declaration or statement at end of input”。该问题通常由代码块缺少闭合的大括号导致,在VIM编辑器中通过代码缩进检查可以辅助定位此类语法错误。
GCC编译出错:
error:expected declaration or statement at end of input
在VIM中用ggVG= 对代码进行缩进,发现有一个函数的缩进不对,顺个这个函数往上找到一处缺少一个"}"。
1万+

被折叠的 条评论
为什么被折叠?