英文: Can I change a std::string, which has been assigned to a std::string_view 问题 我刚刚得知C++17引入了std::s...
为什么将字符串初始化为“”””比使用默认构造函数更高效?
英文: Why is initializing a string to "" more efficient than the default constructor? 问题 通常情...
不能创建一个包装std::string的包装器,它只会产生”syntax sugar”。
英文: Can not create a wrapper around std::string that results in only "syntax sugar" 问题 我知道...
花括号初始化与std::string
英文: Curly Brace Initialisation with std::string 问题 我最近越来越多地使用花括号初始化。尽管我在这种情况下发现与圆括号初始化有所不同,我想知道为什么。 ...
为什么我的字符串为空,而我可以访问单个字符?
英文: Why is my string null while if I can access an individual char? 问题 以下是翻译好的内容: 我是C++的新手,最近通过u-dem...
如何从可能包含空值的缓冲区构造`std::string`?
英文: How to construct a `std::string` from a buffer that may or may not contain a null? 问题 以下是翻译好的部分:...
C++继承:构造函数中的字符串构造
英文: C++ inheritance: string construction in constructor 问题 I'm learning C++ at the moment and implem...