Why won't this reverse in the private member s?Code:#include<string.h>
#include<iostream.h>
const int max_len = 255;
class string {
public:
void assign(const char* st)
{ strcpy(s, st); len = strlen(st); }
int length() const { return len; }
void print() const
{ cout << s << "\nLength: " << len << endl;}
private:
char s[max_len];
int len;
reverse();
};
int main(void)
{
string one, two;
char three[40] = {"My name is Charles."};
one.assign("My name is Alan.");
two.assign(three);
cout << three;
cout << "\nLength: " << strlen(three) << endl;
if (one.length() <= two.length())
one.print();
else
two.print();
return 0;
}