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 阅读全文
posted @ 2012-01-18 23:05 江海不系舟 阅读(878) 评论(0) 推荐(0)