Add containers module with initial implementation and integrate into CMake build system.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ClassA.h"
|
||||
#include <list>
|
||||
|
||||
int main() {
|
||||
ClassA a{};
|
||||
@@ -20,5 +21,24 @@ int main() {
|
||||
delete pComparable;
|
||||
pComparable = nullptr;
|
||||
|
||||
// copy object
|
||||
ClassA a2 = a;
|
||||
|
||||
std::list<ClassA> list;
|
||||
std::list<ClassA>::iterator it;
|
||||
|
||||
for (it = list.begin(); it != list.end(); ++it) {
|
||||
it->Print();
|
||||
}
|
||||
|
||||
std::list<IComparable*> list2;
|
||||
std::list<IComparable*>::iterator it2;
|
||||
|
||||
for (it2 = list2.begin(); it2 != list2.end(); ++it2) {
|
||||
(*it2)->CompareTo(&a);
|
||||
}
|
||||
|
||||
IComparable* pComparables[10];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user