c wait for stdin read?
问题 in my application, i'm trying to achieve something like this: i have: data 0, data 1, data 2, ... data n. some parameters to pass flow: starts the program with some parameters and write data 0 into stdin the program does calculation according to the passed data "data 0" and parameters "wait" for new stdin and (clear old stdin,buffer and variables?) repeat 1 ~2 when i put data 1, data 2... and so on when reaches data n, terminate(or if i input a abort code to stdin telling the program to