View Full Version : system command in background
01-13-2008, 07:11 AM
i have a line in my code
system("dir") in a program in dev c++
it causes a seperate window command prompt to open and then it executes.
can we run it in background so that user does not even know of execution of the command
01-13-2008, 07:14 AM
This doesn't have anything to do with OpenGL. I suggest you ask this question in a C++ forum...
01-13-2008, 11:33 AM
it is being used in part of my opengl project .
It doesn't matter if your project uses OpenGL or not. Running a system command in the background is totally irrelevant to OpenGL.
01-13-2008, 12:42 PM
I agree with Bob; this is unrelated to OpenGL. Try CodeProject.com for example.
But to answer to this question shortly: No, you can't. The system function always opens up a console window displaying the results of the command. You can try using popen, or even better, use the Windows API to get directory contents. Ask from C++ forum for details.
01-14-2008, 07:54 AM
thanks Henri H
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.