中午的时候看了c语言的书在做题目,做完之后发现gcc 竟然编译不过报错如下:
ext4.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
int main(void)
^
text4.c:12:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
text4.c:16:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
text4.c:18:1: error: expected ‘{’ at end of input
}
在通过自身查找之后原来是自己编写的函数在声明的时候没有写“;”
好愚蠢
!!!
2017/8/2