以下代码在C++下编译时有问题:#include<stack>#include<iostream>#include<assert.h>using namespace std;int main(){ stack<int> S; S.push(8); S.push(7); S.push(7); S.push(4); assert(S.size()==3); assert(S.top()=4); cout<<S.top(); S.pop(); assert(S.top()==7); cout<<S.top(); S.pop(); assert(S.top()==8); cout<<S.top(); S.pop(); assert(S.empty()); reurn 0;}错误如下:fatal error C1010: unexpected end of file while looking for precompiled header directiveError executing cl.exe.¶þ·Ö·¨.exe - 1 error(s), 0 warning(s)请高手分析一下
热心网友
可以包含一个不带扩展名的头文件吗?stack S;这是什么意思?没见过尖括号这么用的。错误提示的意思是,在重新编译头文件的时候,遇到意外的文件结尾。可能是头文件写的有错。
热心网友
我也是这样的情况不知道怎么回事,学习下