C++ primeplus string和STL

String类和STL

1.string类

1.string类的构造函数
C++ primeplus string和STL
C++ primeplus string和STL
C++ primeplus string和STL
C++ primeplus string和STL

2.string类的输入
C++ primeplus string和STL

3.string类的其他操作

2.智能指针模板

1.智能指针的作用:常规指针有时候会忘记释放new的内存空间,所以采用智能指针来改进,智能指针其实是一个类。
C++ primeplus string和STL
2.智能指针的如何使用?
C++ primeplus string和STL
C++ primeplus string和STL

3.智能指针注意事项

  • 不可把非new的指针赋给智能指针。
    C++ primeplus string和STL

  • C++ primeplus string和STL
    C++ primeplus string和STL

C++ primeplus string和STL

3.标准模板库与STL