-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyString.h
More file actions
43 lines (33 loc) · 828 Bytes
/
MyString.h
File metadata and controls
43 lines (33 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include<iostream>
#include<fstream>
using namespace std;
class MyString
{
private:
char* pr_CharArray;
int pr_Array_Length;
public:
//constructors
MyString();
MyString(int, char*);
MyString(char*);
MyString(MyString&);
//operators
friend void operator >>(istream&, MyString&);
friend void operator <<(ostream&, MyString&);
char& operator[](int const);
MyString& operator =(const MyString&);
MyString operator +(const MyString&);
MyString operator -(const MyString&);
bool operator ==(const MyString&);
bool operator >(const MyString&);
bool operator <(const MyString&);
bool operator !=(const MyString&);
friend void operator >>(ifstream&, MyString&);
friend void operator <<(ofstream&, MyString&);
//Functions
void Clear();
//Destructor
~MyString();
};