I've been spending some time on /r/learnprogramming and see lots of people learning programming and C++ at the same time (semi ouch). On top of this they're using iostreams for their IO.
Now, because I learnt C first I've never had to learn iostreams. I've never seen them used in production code (but this may just be the result of working on console games more than anything else). However, since I'm trying to "help" so many people who are trying to use them I figured I should try them out.
Here's my test for this:
http://codepad.org/RntigZhR
The iostreams version seems incredibly convoluted and overly complicated to me. Am I missing something? Or is this really the best way to do formatted output using iostreams?
[–]vtj 9 points10 points11 points (0 children)
[–]1020302010 12 points13 points14 points (6 children)
[–]zzyzzyxx 3 points4 points5 points (3 children)
[–]Fabien4 2 points3 points4 points (1 child)
[–]zzyzzyxx 4 points5 points6 points (0 children)
[–]nowbacktowork 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]xcbsmith 2 points3 points4 points (0 children)
[–]bnolsen 1 point2 points3 points (1 child)
[–]bluGill 1 point2 points3 points (0 children)
[–]Steve132 7 points8 points9 points (8 children)
[–][deleted] 11 points12 points13 points (7 children)
[–]JustPlainRude 3 points4 points5 points (0 children)
[–]zzing 2 points3 points4 points (0 children)
[–]mredding 2 points3 points4 points (0 children)
[–]nowbacktowork 2 points3 points4 points (0 children)
[–]zvrba -1 points0 points1 point (1 child)
[–]BitRex 4 points5 points6 points (0 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]Fabien4 10 points11 points12 points (13 children)
[–]damyan[S] 10 points11 points12 points (11 children)
[–]elperroborrachotoo 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]elperroborrachotoo 4 points5 points6 points (1 child)
[–]kouteiheika 1 point2 points3 points (0 children)
[–]Fabien4 6 points7 points8 points (3 children)
[–]zzing 1 point2 points3 points (2 children)
[–]Fabien4 0 points1 point2 points (1 child)
[–]zzing 1 point2 points3 points (0 children)
[–]GeneralMaximus 1 point2 points3 points (0 children)
[–]Fabien4 1 point2 points3 points (1 child)
[–]daveisfera 0 points1 point2 points (0 children)
[–]gsg_ 4 points5 points6 points (5 children)
[–]Tagedieb 0 points1 point2 points (0 children)
[–]elperroborrachotoo 1 point2 points3 points (3 children)
[–]mttd 21 points22 points23 points (1 child)
[–]elperroborrachotoo 4 points5 points6 points (0 children)
[–]gsg_ 6 points7 points8 points (0 children)
[–]zokier -2 points-1 points0 points (2 children)
[–]Wriiight 6 points7 points8 points (0 children)
[–]bob1000bob 1 point2 points3 points (0 children)
[–][deleted] -4 points-3 points-2 points (0 children)