代码改变世界

随笔档案-2013年03月

string类型及其操作。

2013-03-15 16:45 by Dr.Ray, 2969 阅读, 收藏,
摘要: 头文件:string(无.h!)string类的构造函数与析构函数:1、string s;2、string s(str);// copy str to s;3.string s(str, strhead);//copy str to s from the strhead position4.string s(str,strhead,strtail);//copy str to s from strhead to strtail5.string s(cstr);//copy a c string to s;6.string s(char*, char*len);//copy a c string 阅读全文