When I use the system() command a dos prompt pops up. How can I supress this dos window?
When I use the system() command a dos prompt pops up. How can I supress this dos window?
Why use system to do stuff when you can use better functions, like those mentioned in
http://faq.cprogramming.com/cgi-bin/...&id=1043284392
STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.
Ok I want to send a command to the cmd.exe and get the output back. What function would you use to do this?Originally Posted by Shakti
Try _popen() - it works much like fopen()
Also, which command are you trying to read the output of?
If it's something like "dir", then there are better alternatives.
Any That what the user inputs in my programm should go to the cmd.exe the output back to my programm.Originally Posted by Salem
OK works fine, but the dos box still pops up
Last edited by keeper; 03-12-2006 at 07:59 AM.
You can use win32 api function CreateProcess() which has an option disable the command window, but it works more like system() than _open().