If you want a unique_ptr
pointer to a dynamically allocated array of strings, you may want to use the unique_ptr<T[]>
form, i.e.:
unique_ptr<string[]> items;
In fact:
unique_ptr<T>
is a pointer to a single instance ofT
unique_ptr<T[]>
is a pointer to an array ofT
s