编译错误,救救!
查看原帖
编译错误,救救!
796403
sandwich03楼主2023/7/9 20:32
#include<bits/stdc++.h>
using namespace std;
int main()
{   
    int n,a[10005],wh,wh1;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    	cin>>wh;
    	if(wh==1)
    	{
    		cin>>wh1;
    		a.push(wh1);
		}
		if(wh==2)
		{
			if(!a.empty())
			a.pop();
			else
			cout<<"ERR_CANNOT_POP";
		}
		if(wh==3)
		{
			if(!a.empty())
			a.front();
			else
			cout<<"ERR_CANNOT_QUERY";
		}
		if(wh==4)
		{
			cout<<a.size();
		}
	}
	return 0;
}
```cpp
2023/7/9 20:32
加载中...