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:
@@ -1,8 +1,13 @@
|
||||
#ifndef CLASSES_ICOMPARABLE_H
|
||||
#define CLASSES_ICOMPARABLE_H
|
||||
#include <iostream>
|
||||
|
||||
class IComparable {
|
||||
public:
|
||||
// only for presentation purpose
|
||||
IComparable() { std::cout << "IComparable created" << std::endl; }
|
||||
virtual ~IComparable() { std::cout << "IComparable destroyed" << std::endl; }
|
||||
|
||||
virtual int CompareTo(IComparable* other) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user