ifndef BASIC_STRING_H define BASIC_STRING_H include string include ios

 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
#ifndef BASIC_STRING_H
#define BASIC_STRING_H
#include <string.h>
#include <iostream>
class BasicString {
public:
BasicString();
BasicString(char);
BasicString(char *);
BasicString(const BasicString&);
~BasicString();
int length();
void clear();
friend ostream& operator<<(ostream&, BasicString&);
friend istream& operator>>(istream&, BasicString&);
protected:
char *_data;
int _length;
};
class Complex: public BasicString
{
public:
Complex();
Complex(char *);
Complex(const Complex&);
~Complex();
};
#endif