IT常识
技术 Python PHP JavaScript IOS Android Java 数据库 资源 公众号 代码片段 github
  • IT常识
  • PHP

C++ Primer阅读笔记:string

Posted 2023-01-27 海轰Pro

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C++ Primer阅读笔记:string相关的知识,希望对你有一定的参考价值。

目录

  • 简介
  • 初始化string对象
    • 初始化方法
    • 直接初始化与拷贝初始化
  • string对象上的操作
    • 操作方式
    • 读取string对象(cin>>s、cout<<s)
    • getline(is,s)
    • empty()
    • size()
    • string对象的比较(>、<、<=、>=)
    • 两个string对象相加(s1+s2)
    • 字面值与string对象相加
    • 遍历string对象
  • 参考
  • 结语

简介

Hello!

以上是关于C++ Primer阅读笔记:string的主要内容,如果未能解决你的问题,请参考以下文章

C++ Primer阅读笔记:基础

C++ Primer阅读笔记:基础

C++ Primer阅读笔记:vector|迭代器|数组

C++ Primer阅读笔记:vector|迭代器|数组

C++ Primer阅读笔记:const | constexpr | 类型别名 |auto

C++ Primer阅读笔记:const | constexpr | 类型别名 |auto

(c)2006-2024 SYSTEM All Rights Reserved IT常识