The user has to be able to pass the MyString object a char array like arr = {'g','o','o','d','b','y','e' }, or a string such as “hello”
I don’t know where to get started because I don’t know how to make a method that can receive a dual type..
The user has to be able to pass the MyString object a char array
Share
Just overload your methods:
EDIT In your title you say method but in your example you show constructors. Regardless, the same idea can be applied to both.