Add containers module with initial implementation and integrate into CMake build system.

This commit is contained in:
2026-02-21 10:38:58 +01:00
parent 90fbcc38dc
commit 939e98d5b2
16 changed files with 272 additions and 12 deletions
+20
View File
@@ -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;
}