c++primer chapter three
3.1命名空间的using声明
using声明具有如下的形式:using namespace :: name;
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include <iostream> 2 3 4 using std :: cout; using std :: endl; 5 6 int main(){ 7 int i = 9; 8 cout << i << endl; 9 }
初始化string对象的方式
string s1;
string s2(s1);
string s2 = s1;
string s3("value")
string s3 = "value"
string s4(n,'c')
string对象上的操作