+ 2
How to run cmd with pre written commands in c++???
Hey guys! I want to know how to run cmd with prewritten commands. I want to do this using c++. If anyone could help with the code it would be a huge help. Thank you.
2 Respostas
+ 1
hi Shrehan Raj Singh you have already tagged system() in question... so, pass whatever you want to execute to system and it would get executed... if you are willing to wait for console closed after your result, pause can be used or get input can be used...
below article might help you :
https://www.geeksforgeeks.org/system-call-in-c/
I hope I have not misunderstood your question
+ 1
Ketan Lalcheta. If u could give an example code then it would be really helpful