Spoofing std::cin in C++

I'm in a course for C++ programming.

Our professor created a linux validation script against which our program output must match exactly.

The problem is, this program excepts probably 150-200 lines of input and if anything goes in wrong you have to start all over again. If you even enter an incorrect char, it must be restarted as the backspace registers as a character of its own.

Is there a way I can force the CIN input to match exactly, so that the program will input the data on its own according to my specifications?


No, there isn't. You must know what is being expected beforehand to pass the validation.

Need Your Help

Need help (starting place) with basic blend WPF

wpf winforms visual-studio-2010 c#-4.0 expression-blend

I am trying to learn WPF, and like anything programming I do, I always try to create something fun for my self so the project is not boring.

How to clip image/view with mask from CGRect

objective-c xcode cocoa cgrect

I have a class in which I draw a shape using: