64,637
社区成员
发帖
与我相关
我的任务
分享
#ifndef T_H
#define T_H
#include<stack>
using namespace std;
void out(stack<int>&);
#endif
#include<stack>
using namespace std;
void out(stack<int>&a)
{
a.push(1);
a.push(2);
while(!a.empty())
{
cout<<a.top()<<endl;
a.pop();
}
}
#include<iostream>
using namespace std;
#include "t.h"
int main()
{
stack<int>a;
out(a);
return 0;
}