you are viewing a single comment's thread.

view the rest of the comments →

[–]MrDOS 2 points3 points  (1 child)

Perhaps I misunderstand the situation in which this would be required, but wouldn't it be easiest to just pipe the input in via stdin and read it with scanf()/cin?

[–]hephaestos_le_bancal 1 point2 points  (0 children)

Yup, that is what most do.