?? testprogstack.cpp
字號:
//Program to test the various operations of a stack
#include <iostream>
#include "myStack.h"
using namespace std;
int main()
{
stackType<int> intStack(50);
stackType<int> tempStack;
intStack.push(23);
intStack.push(45);
intStack.push(38);
tempStack = intStack; //copy intStack into copyStack
cout<<"tempStack elements: ";
while(!tempStack.isEmptyStack()) //print copyStack
{
cout<<tempStack.top()<<" ";
tempStack.pop();
}
cout<<endl;
cout<<"The top element of intStack: "<<intStack.top()<<endl;
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -