01 2012 档案
摘要:#include <string>#include <iostream>using namespace std;int main(){string str1c ( "Hello " ), str2c ( "WideeWorld" );str1c.assign ( str2c , 5 , 3 );//将str2c字符串从第5位开始往后3位赋值给str1;cout<<str2c<<endl;//输出结果为WideeWorldcout<<str1c<<endl;//输出结果为Worsyst
阅读全文