Robert Heller
Robert Heller

Reputation: 19

Is it possible to pass std::cin to a function wanting an iostream?

I am using a library that has a function taking an iostream for a data stream, but I want to pass std::cin. It apparently is not possible to pass an istream to an iostream, but is there way around this? Some way to create an iostream from stdin (eg re-opening stdin)?

Upvotes: 0

Views: 72

Answers (0)

Related Questions