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

高手请帮小弟我解决下关于redeclaration的有关问题

2012-03-28 
高手请帮我解决下关于redeclaration的问题我的文件包含CALCUL.hCALCUL.cCALCUL.prj其中里面引用了STACK里

高手请帮我解决下关于redeclaration的问题
我的文件包含CALCUL.h   CALCUL.c   CALCUL.prj
其中里面引用了STACK里面的STACK.C,STACK.H程序
在CALCUL运行的时候总是出现错误提示   redeclaration   of   Element
                                                                                                                              redeclaration   of   Next
而那两个重定义的变量正好是STACK里面的变量
请高手帮我看看是什么问题。。。
下面是头文件:
/*CALCUL.C*/
#include <stdio.h>
#include ".\code\stack\STACK.c "
#include ".\code\caculate\CALCUL.h "

/*CALCUL*/
#include   <ctype.h>
#include   <stdio.h>
#include   ".\code\stack\STACK.h "LCUL.H*/

/*CALCUL.PRJ*/
.\code\caculate\CALCUL.c
.\code\caculate\CALCUL.h

[解决办法]
试试把
#include ".\code\stack\STACK.c "

中的.c改成.h
[解决办法]
/*CALCUL.C*/
#include <stdio.h>
#include ".\code\stack\STACK.h "
#include ".\code\caculate\CALCUL.h "

/*CALCUL.h*/

#ifndef _CLACUL_H_
#define _CLACUL_H_

#include <ctype.h>
#include <stdio.h>
#include ".\code\stack\STACK.h "
.....
#endif


/*STACK.h*/

#ifndef _STACK_H_
#define _STACK_H_

// your stack.h stuff
.....
#endif


[解决办法]
把你的stack.h和stack.c贴出来吧

热点排行