String Conversion Workarounds and to_string()

Give Feedback

In this lesson, you’ll see common workarounds to the problem highlighted in the last lesson. You’ll see two ways in which string conversions inside a class can be done. The first way is to reach into the class and print out attributes directly and the second method is to use a custom to_string() method to print out a string representing the class.

Comments & Discussion

Become a Member to join the conversation.