高手请帮小弟我解决下关于redeclaration的有关问题
高手请帮我解决下关于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贴出来吧
我的文件包含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贴出来吧