Lesson 1: Arrays and Strings

variable of type string, only a variable that is an array of char. If you ever need to convert back and forth between a C-string and a string, then going from a C-String to a string is easy. Just use assignment: char str[] = "hello"; string myString = str; To turn a string into a C-String, there is a function called c_str() : ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download