consolidate all repos to one for archive
This commit is contained in:
15
semester_2/programiranje_2/primeri/Example23/main.cpp
Normal file
15
semester_2/programiranje_2/primeri/Example23/main.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
#include "Stack.h"
|
||||
|
||||
int main() {
|
||||
Stack<int> s1,s2;
|
||||
Stack<float> s3;
|
||||
s2.push(2);
|
||||
s2.push(3);
|
||||
s2.push(4);
|
||||
s1 = s2; // OK
|
||||
std::cout << s1.pop() << " " << s1.pop() << std::endl;
|
||||
//s3 = s2; // ERROR without member templates
|
||||
//std::cout << s3.pop() << " " << s3.pop() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user