Characters and Strings

Peter Van Weert, Marc Gregoire

C++ Standard Library Quick Reference(2019)

引用 0|浏览0
暂无评分
摘要
C++ supports C-style strings—plain C-style character arrays terminated with a null character ('\0', with ASCII code zero). The C Standard Library offers various headers with functions to manipulate such strings. Working directly with C-style strings, however, has serious drawbacks. Analogous to working with plain arrays (compared to working with, say, std::vector), a C-style string doesn’t know its own size, and it is your job to allocate the required memory. It also falls to you to ensure these C-style strings are, and always remain, properly null-terminated. We therefore recommend you do not work directly with C-style strings, and use the container-like abstractions offered by the C++ Standard Library instead.
更多
查看译文
关键词
strings,characters
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要