Object-Oriented Programming · Point72 · Hard
Design a class template named SmartString with the following specifications: It takes a single size_t template parameter called STORAGE_SIZE, which defaults to 16. A default constructor SmartString() must be available. A constructor SmartString(const char* s, size_t len) must be available. A member function c_str() that returns a null-terminated const char. A member function length() that returns the length of the stored string in O(1) time. A static member function or…
Checking your access…