My first time here.
I have a very old degee in CPS and am taking a C++ class and I want to clear my string. I don't want to
thestring = ' ';
because I want to concatenate other strings on to this. I want the string to be totally empty.
My textbook says that there are a ton of member functions to work with strings. one of them is:
The book says it is in <string>. But when I go to compile I get this error message:
E:\SUSAN\C++\Lab4.cpp(57) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
Can someone here please tell me what this means?
I looked at all the .h files on my computer and I don't see any other ones to do string manipulation. I read the .h file and I did not see any mention of the ".clear()" function.
I am most grateful.