The same way std::string does it
class String
{
public:
String();
String(char *str);
~String();
String& operator= (char *str);
operator char* ();
const char* c_str() {return szStr;}
bool operator== (char *str);
private:
char *szStr;
};
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Online 21,951 posts
since Aug 2005