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

高手指教!该怎么处理

2012-02-14 
高手指教!#include ctype.h#include stdlib.h#include iostream.h#includeLinStack.h usingnamesp

高手指教!
#include <ctype.h>
#include <stdlib.h>
#include <iostream.h>
#include   "LinStack.h "
using   namespace   std;
template <class   T>
void   PostExp(LinStack <t>   &s)
{
char   ch;
t   x,x1,x2;
cout < < "输入表达式 " < <endl;
while(cin> > ch&&ch!= '# ')
{
if(isdigit(ch))
{
cin.putback(ch);
cin> > x;
s.Push(x);
}
else
{
x2=s.Pop();
x1=s.Pop(();
switch(ch)
{
case '+ ':{x1+=x2;break;}
case '- ':{x1-=x2;break;}
case '* ':{x1*=x2;break;}
case '/ ':
if(x2==0.0)
{
cout < < "除数为 ";
exit(0);
}
else
{
x1/=x2;
break;
}
}
s.Push(x1);
}
}
cout < < "后缀表达式计算结果 " < <s.Pop() < <endl;
}
void   main(void)
{
Linstack <int>   s;
PostExp(s);
}
编译到最后就一个错误
fatal   error   C1083:   Cannot   open   include   file:   'LinStack.h ':   No   such   file   or   directory
是不是我的vc6.0没有这个头文件啊?



[解决办法]
是不是我的vc6.0没有这个头文件啊?
================
这个不是 库文件,
你需要自定义这个文件。

如果不是必须,
可以去掉这个 头文件包含 ~

热点排行