consolidate all repos to one for archive
This commit is contained in:
23
semester_2/programiranje_2/primeri/Example01c/main.cpp
Normal file
23
semester_2/programiranje_2/primeri/Example01c/main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include "Stack01c.h"
|
||||
|
||||
int main() {
|
||||
Stack my_stack1, my_stack2;
|
||||
my_stack1.push(7);
|
||||
my_stack1.push(1);
|
||||
my_stack2.push(2);
|
||||
//my_stack1.top=0;
|
||||
//my_stack1.arr[1]=4;
|
||||
std::cout << my_stack1.pop() << " ";
|
||||
std::cout << my_stack1.pop() << " ";
|
||||
std::cout << std::endl;
|
||||
if (my_stack1.isEmpty())
|
||||
std::cout << "Stack1 is empty" << std::endl;
|
||||
else
|
||||
std::cout << "Stack1 isn't empty" << std::endl;
|
||||
if (my_stack2.isEmpty())
|
||||
std::cout << "Stack2 is empty" << std::endl;
|
||||
else
|
||||
std::cout << "Stack2 isn't empty" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user