文章分类 -  C/C++

STL--string(1)
摘要:1.string使用之前的准备#include using namespace std;2.string的构造函数 1 #include 2 using namespace std; 3 4 void main() 5 { 6 string s1; string s2; //默认构造函数: 7 8 string s1(s2); //拷贝构造函数 9 10 string strA("UIPower"); //带参数的构造函数:11 string strB(5,'A'); //"AAAAA"12 }3... 阅读全文
posted @ 2013-07-31 23:28 奎哥 阅读(179) 评论(0) 推荐(0)