#include <iostream>
#include <stack>
#include<cstring>
using namespace std;
void main()
{
stack<char>x;
for(char i='a';i<='z';++i)
{x.push(i);}
int len=x.size();
for(i=0;i<len;++i)
{
cout<<x.top()<<" ";
x.pop();
}
cout<<endl;
}
如果换成for(i=0;i<x.size();++i)输出就少了一半
为什么呀