string a;
string a;
string b = "initial text";
string c("more text");
string d(b); // copy of b
a = "some text"; // assignment to a
Subscript index values are not checked for validity.
// see if string b is prefix to a
if (a.substr(0, b.length()) == b) ...
Previous slide
Next slide
Back to first slide
View graphic version