Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Executing DOS commands in C++
Name: iN3cRiPT Date: June 24, 2003 at 10:07:05 Pacific OS: Windows XP Pro CPU/Ram: 2.4 GHz, OCd to 2.8, 1 gi
Comment:
ok guys, here is a question i have for you, if i want to execute dos commands in c++, what would i use? i'd really appreciate if you could answer this question, as batch files don't do everything i need (being a network admin with new computers every day). If you could please help me out... please do so :). also, i'm looking for a free/cheap c++ compiler thanks in advance :)
Name: iN3cRiPT Date: June 24, 2003 at 10:48:39 Pacific
Reply:
Thanks alot for the compilers and the System() code, but being that i'm quite new to c++, how exactly would i use this... thanks for that comment, and thx in advance if you comment again :)
0
Response Number 3
Name: micah Date: June 24, 2003 at 10:53:30 Pacific
Reply:
Here's an example in the help I found. Basically all you do is put in your dos command and it will print out the output.
/* SYSTEM.C: This program uses * system to TYPE its source file. */
Summary: I'm not sure I remember from my C++ days (which are quickly coming back to haunt me since my operating systems class is all C...), but do you need to escape the slash? c:\\mydir This question is asked...