{"title":"8. Strings and Pointers","authors":"","doi":"10.1515/9783110593846-008","DOIUrl":null,"url":null,"abstract":"The C++ string class makes it easy to create and manipulate string data, and is a good thing to learn when rst starting to program in C++ because it allows you to work with string data without understanding much about why it works or what goes on behind the scenes. You can declare and initialize strings, read data into them, append to them, get their size, and do other kinds of useful things with them. However, it is at least as important to know how to work with another type of string, the C string.","PeriodicalId":128463,"journal":{"name":"Programming in C++","volume":"77 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-05-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Programming in C++","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1515/9783110593846-008","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The C++ string class makes it easy to create and manipulate string data, and is a good thing to learn when rst starting to program in C++ because it allows you to work with string data without understanding much about why it works or what goes on behind the scenes. You can declare and initialize strings, read data into them, append to them, get their size, and do other kinds of useful things with them. However, it is at least as important to know how to work with another type of string, the C string.
c++ string类使创建和操作字符串数据变得容易,并且在开始用c++编程时学习它是一件很好的事情,因为它允许您使用字符串数据,而无需了解它的工作原理或幕后发生的事情。你可以声明和初始化字符串,向它们读入数据,附加到它们,获取它们的大小,以及对它们做其他有用的事情。然而,了解如何使用另一种类型的字符串(C字符串)也同样重要。