Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторные работы / MyStr / mystr
.h#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;
};