首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

初学者求解,error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘_attribute_’ before ‘void’

2012-03-20 
菜鸟求解,error:expected ‘’, ‘,’, ‘’, ‘asm’ or ‘__attribute__’ before ‘void’这段程序本来是可以用的

菜鸟求解,error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
这段程序本来是可以用的,但不知道是我不小心按了什么,编译的时候就出现了
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’这个错误。
在网上查了查,感觉解决不了我的问题。
请各位赐教啊!
谢谢各位,不胜感激
附代码如下:
#ifndef BOOKS_H_INCLUDED
#define BOOKS_H_INCLUDED
struct books
{
  char names[50];
  struct books *next;
};


#endif // BOOKS_H
_INCLUDED


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "books.h"

void add(struct books* head);

void add(struct books *p) //问题在这行
{
  getchar();
  struct books *q;
...................
}

 

[解决办法]
#endif // BOOKS_H
_INCLUDED
[解决办法]
#endif // BOOKS_H
_INCLUDED
这个地方应该是
#endif // BOOKS_H_INCLUDED
只是个注释。。。

热点排行