Add containers project with CMake setup and array-related functionality

- Implement `printArrayAtPosition` in `functions.cpp` with input validation.
- Created `main.cpp` to demonstrate array operations using C arrays and `std::vector`.
- Updated `ClassA` and `IComparable` with constructors, destructors, and deep copy logic.
- Adjusted IntelliJ project configuration for new containers module.
This commit is contained in:
2026-02-20 16:24:24 +01:00
parent bd50c5403f
commit f5e4caadf3
10 changed files with 132 additions and 2 deletions
+13
View File
@@ -13,5 +13,18 @@ int main() {
a.CompareTo(pA);
IComparable* pComparable = nullptr;
pComparable = new ClassA();
pComparable->CompareTo(&a);
// pA = dynamic_cast<ClassA *>(pComparable);
// if (pA != nullptr) {
// pA->Print();
// }
delete pComparable;
pComparable = nullptr;
ClassA a2 = a;
return 0;
}