let's say I have this c++ code which I compiled into an executable out.exe
int main(){
int a = 0;
cin>>a;
if (a)
cout<<"done";
return 0;
}
Normally I would execute it using the command line by typing its name, then it would wait for my input.
However, what I want it to pass the input in the same line that I am calling the executable like so:
out.exe 1
1 being the input so the program wouldn't wait for my input and directly outputs:
done