execut exe file and giving data

well , i have h.exe file. when i run it, it wait for user input 5 digit number then do something...
i execute my file with system("h.exe") and i want my program give 5 digit number automatically (12345) so when i run my program i only see the answer and don't give the number again and again ...
what should i do
If "h.exe" accepts input from the command line, or if you can re-write it to do so (we can help), then just make the argument to "system()" a string, append a space and the 5 digit number to end of it, and pass it to "system()" with the c_str() string member function.
Topic archived. No new replies allowed.