#include #include "bstring.h" /* char* str; // a pointer to our dynamic array of char int size; // the size (length) of my string. // allocation will be size+1 at all times // so that I can always store INTERNALLY as a c-string */ // these are the stand-alone friend functions to the class ostream& operator<< (ostream& os, const BString& s) { os << s.str; // print the c-string return os; } istream& operator>> (istream& is, BString& s) { } BString operator+(const BString& x, const BString& y) { } bool operator< (const BString& x, const BString& y) { } bool operator> (const BString& x, const BString& y) { } bool operator<=(const BString& x, const BString& y) { } bool operator>=(const BString& x, const BString& y) { } bool operator==(const BString& x, const BString& y) { } bool operator!=(const BString& x, const BString& y) { } // below are the MEMBER functions of the class BString::BString() // initialize an empty string { size = 0; str = new char[1]; str[0] = '\0'; } BString::BString(const char* s) // initalize string object FROM incoming c-string s { size = strlen(s); str = new char[size+1]; strcpy(str, s); // would this also work here? } BString::BString(int x) { } BString::~BString() { } BString::BString(const BString& s) { } BString& BString::operator=(const BString& s) { } BString& BString::operator+=(const BString& s) { } void BString::Display() const { } int BString::length() const { } BString BString::substring(int index, int len) { }