Sign in

gwj / po_oopc · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • po_oopc
  • examples01-en
  • 08-stackcpp
  • teststack.cpp
  • Reformatted code
    c0b14c54
    Grzegorz Jabłoński authored
    2022-09-16 14:36:36 +0200  
    Browse Code »
teststack.cpp 279 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "stack.h"
#include <stdio.h>

int main()
{
    stack s1;
    stack s2;
    s1.push(1);
    s1.push(2);
    s1.push(3);
    s2.push(5);
    s2.push(6);
    {
        stack s3;
    }
    printf("%d %d\n", s1.pop(), s2.pop());
    printf("%d\n", s1.pop());
    return 0;
}