I need helpfixing my .cpp code below (let me know if you need any other info): s
ID: 3540008 • Letter: I
Question
I need helpfixing my .cpp code below (let me know if you need any other info):
string& string::operator+=(const char c)
{
cout<<"*******S: "<<_size<<" C: "<<_cap<<" "<<_data;
// Increase capacity if necessary
if (_size == _cap)
increase_capacity();
// Add to array
//While(c != '')
++_size;
_data[(_size-1)] = c;
cout<<"*********S: "<<_size<<" C: "<<_cap<<" "<<_data;
// Increase size
// return *this;
}
string private members are:
private:
private:
size_type _size;
size_type _cap;
T* _data;
Test program:
Explanation / Answer
hello i can help you