View Full Version : DOS-Commands in C++


KaeptnOvi
Dec 23, 2002, 06:40 AM
I'm trying to write a small program in c++ but I encounter the following problem

I know there is a way to directly use DOS commands in C++ but I somehow forgot how to do this. I want to use "net send" to do something for me.

Does anyone know how to do this?

kcwong
Jan 01, 2003, 11:09 PM
Go to MSDN online and search for "_spawn".

Lucky
Jan 02, 2003, 07:51 AM
The solution to this problem was already given in Gamecatcher´s Tech Support section. :yeah:

The command is simple: SYSTEM("blah");, where blah can be any DOS prompt command.
Everybody that learned C in school or college should know that, as most early programming examples include the line SYSTEM("PAUSE"); to get the "Hit any key to continue" notification on screen.
:D