X-Git-Url: http://git.hcoop.net/clinton/bobotpp.git/blobdiff_plain/c1dcc49531930194b08d594147ac512e88f1fa16..HEAD:/source/String.H diff --git a/source/String.H b/source/String.H index 70f6a55..7d1bee9 100644 --- a/source/String.H +++ b/source/String.H @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef BSTRING_H #define BSTRING_H @@ -24,15 +24,8 @@ class String { - struct srep { - char *s; // pointer on the data - int n; // reference counter - srep() - { n = 1; } - }; - srep *p; - int len; - + std::string my_string; + public: String(); String(const char *); @@ -89,7 +82,7 @@ public: friend std::string operator+(const std::string &, const String &); - operator const char *() const; + const char* c_str () const; operator std::string () const; friend std::ostream & operator<<(std::ostream &, const String &);