Chapter 18: Problem 6
Find any errors in the following and explain how to correct them: a. std::cout << s.data() << std::endl; // s is "hello" b. erase( s.rfind( "x" ), 1 ); // s is "xenon" c. string& foo() { string s( "Hello" ); ... // other statements return; } // end function foo
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.