the class is called newString. so that line is :
newString::newString(char const*)
my question is that I do not know how to define constructor.
Not yet good at working with pointers
presumably the constructor would new up your internal char* variable to some size and then strcpy the incoming parameter into it, and set anything else that matters, perhaps its length?
that + operator is recursive and looks like it may do something odd.
the class is called newString. so that line is :
newString::newString(char const*)
my question is that I do not know how to define constructor.
So basically, you got an error message that complained about newString::newString(char const*) not being defined, and you knew already that you hadn't defined it, but... you decided to come and post in here about it anyway? Why? What on earth did you think needed explaining about that error, when you already knew you hadn't defined that function?
I don't understand why you claim that you don't know how to define constructors, when you already define two of them in the code you've posted.
Why is your no argument constructor allocating memory for the pointer instead of just assigning the pointer to a nullptr? A nullptr should probably be the expected occurrence if the string is empty.
Also you should get used to use initialization lists with your constructors.
Your constructors look fine. You have some other problems though.
Line 11: Your << operator is private. Not very useful.
Line 37: You're using the < operator.
Lines 40-43: As jonin pointed out your + operator is recursive. This is probably the cause of your crash when you ran out of stack space. Line 40: You don't name the argument. How are you going to append something that you don't name? Line 42: These are empty strings. Line 43: You're trying to concatenate the two empty strings by recursively calling your + operator.