Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
10
Добавлен:
02.05.2014
Размер:
836 б
Скачать
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>

using namespace std;


class MyStr
{
public:
  MyStr();
  ~MyStr();
  MyStr(const char *st);
  MyStr(const MyStr &mystr);
  MyStr &operator=(const MyStr &ms);
  MyStr &operator=(const char *st);
  const char *GetChar() const;
  int GetLength() const;
  int FindSubstr(const MyStr &ms);
  friend const MyStr operator+(const MyStr &mystr1, const MyStr &mystr2);
  const MyStr &operator+=(const MyStr &mystr);
  bool operator==(const MyStr &mystr);
  bool operator!=(const MyStr &mystr);
  friend ostream &operator<<(ostream &os, const MyStr &mystr);
  friend istream &operator>>(istream &is, MyStr &mystr);
  int operator[](int index);
  MyStr InsertStr(int start, const MyStr &mystr);
private:
  char *Data;
  char Len;
};

Соседние файлы в папке MyStr