Which command I need to write to use CMD commands in C++ and which library I need to include. I want to create some gifts for my friends.
8/13/2020 2:12:02 AM
Mr-Powerful4 Answers
New AnswerHave you tried "system"? More detail and examples are at: https://www.tutorialspoint.com/system-function-in-c-cplusplus#:~:text=The%20system%28%29%20function%20is%20a%20part%20of%20the,returns%20the%20command%20after%20it%20has%20been%20completed. In Unix and probably linux also, there are some functions for c programs that give you more control over the running program. Functions like fork, exec, and pipe can help you redirect standard input, output, and standard error of the other process.
You can make use of system() function to pass an command to comand line if the OS allows. Go here to learn more about system() 👇 https://www.geeksforgeeks.org/system-call-in-c/
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message