Because that's kinda the point of toString??
He created a string. That string can be used for things other then printing to cout. It can still be processed and have stuff added to it. Is it better? It decouples where you create the string and where you print it, so you can pass the string to another function that doesn't have access to firstname lastname etc.
Обсуждают сегодня