#include<iostream>
#include<string>
using namespace std;
class mystring
{
public:
mystring(); //用于语句 mystring s1
mystring(const char *s); //用于语句 mystring s["hello"]
mystring(const mystring &rhs); //用于语句 mystring s2(s1),s2和s1完全相同
/*mystring(const mystring & rhs,unsigned int p*s,unsigned int n);
//设串类对象s1的x 值为"C++ programn Design",则上述函数用于语句 mystring s(s1)
mystring append(const char *s);
//设this串的值为:"C++ programn",形参s值为"Design",则调用本函数后
// this串的值为:"C++ programn Design"
//例:
mystring assign(const char *s);
//用于语句 mystring s1;
// s1.assign("China")
int compare(const string & str);
//例:mystring s1("China"),s2("Japan")
// 则 cout<<s1.compare(s2)<<endl;
// 将输出一个负值;
mystring substr(unsigned ine pos,unsigned int n)const;
//例:mystring s("I am a teacher")
// s substr(7,7);
// 的返回值为串 "teacher"
// mystring t(s,substr(7,7));*/
unsigned short getlen()const{return len;}
const char *getmystring()const{return pstring;}
private:
char *pstring;
int sige; //申请空间长度;
int len; //实际串长;
};
请问点可以编写void main()呢?