#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 what is needed for my string */ // these are the stand-alone friend functions to the class ostream& operator<< (ostream& os, const BString& s) { for (int i = 0; i < s.size; i++) os << s.str[i]; return os; } istream& operator>> (istream& os, 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 { str = 0; // null pointer for empty string size = 0; } BString::BString(const char* s) { size = strlen(s); str = new char[size]; for (int i = 0; i < size; i++) str[i] = s[i]; } 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) { }