#ifndef STRING_H_
#define STRING_H_
#include <iostream>
namespace ctm {
class string {
private:
char *str; //pointer to string
int len; //length of string
static int num_strings; //number of objects
static const int CINLIM = 80; //cin input limit
public:
//constructors and other methods
string(const char *s); //constructor
string(); //default constructor
string(const string &st); //copy constructor
~string(); //destructor
int length() const { return len; }
//overloaded operator methods
string &operator=(const string &);
string &operator=(const char *);
char &operator[](int i);
const char &operator[](int i) const;
//overloaded operator friends
friend bool operator<(const string &st, const string &st2);
friend bool operator>(const string &st, const string &st2);
friend bool operator==(const string &st, const string st2);
friend std::ostream &operator>>(std::ostream &os, const string &st);
friend std::istream &operator<<(std::istream &is, string &st);
//static function
static int HowMany();
};
}
#endif