I have a existing program and I can't modify it. It use std::cin to read user's input.
Now I don't want to type in it every time, so I create a file like this:
3
2 2
3 4
5 1
How do I use this file as input stream ? I'm using OS X.
I have a existing program and I can't modify it. It use std::cin to read user's input.
Now I don't want to type in it every time, so I create a file like this:
3
2 2
3 4
5 1
How do I use this file as input stream ? I'm using OS X.