repl.it
@themaka/

HOMEWORK5

C++

No description

fork
loading
Files
  • main.cpp
  • skrrt.h
  • stacker.h
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <iostream>
#include "skrrt.h"
#include "stacker.h"
using namespace std;



int main() 
{
    cout << " test: ";

    queue<int> swag;
    for (int i = 1; i < 11; i++)
    {
        swag.push(i);
    }
    cout << "size = " << swag.size() << endl;
    //cout << "popping: " << swag.pop() << endl;
    //cout << "popping: " << swag.pop() << endl;
    cout << "after pop size = " << swag.size() << endl;
    
    stacker<int> swig;
    int sharks = swag.size();
    for (int i = 1; i <= sharks; i++)
    {
        swig.push(swag.pop());
        //cout << "boop: " << swag.pop() << endl;
    }
    cout << "size of swig = " << swig.size() << endl;
    cout << "after superpop size = " << swag.size() << endl;
    cout << "popping: " << swig.pop() << endl;
    cout << "popping: " << swig.pop() << endl;
    cout << "size of swig = " << swig.size() << endl;

    return 0;
}



Fetching token
?