3 ms·
> ...what is the use case for a program that operates on arbitrary user defined types? That's not what's going on. Neither C nor C++ really permits that. We'r
by simoncion 11y ago
> ...what is the use case for a program that operates on arbitrary user defined types?
That's not what's going on. Neither C nor C++ really permits that.
We're just talking about the relative merits of using printf and friends vs. using iostream to format data for the console or disk.
In either case, you have to write the code for your class that massages the class's internals correctly, but the question is, do you write to the ostream extraction and istream insertion API, or do you write to the substantially less well defined printf-and-friends API?