Smart dynamic array

Report a typo

Create a class named SmartDynamicArray that dynamically allocates an array of integers in its constructor using std::unique_ptr. The size of the array should be specified as a parameter to the constructor. There must be a method that prints all the values

Sample Input 1:

2 3 4

Sample Output 1:

Array values: 3 4
Write a program in C++ 20
class SmartDynamicArray {
private:
std::unique_ptr<int[]> array;
int size;

public:

};

Create a free account to access the full topic