MY PURPOSE: I want to make a c++ program that could use DOS commands.
OPTION: I can make a batch file and put into it the DOS commands. But I don\'t know how
Putting dos commands inside batch script seems like a good idea. Then you can of course use system command.
system
But if your C++ program also needs stdout of the batch script you were running, you should try: _popen or _wpopen.
_popen
_wpopen
For more info and code sample visit MSDN.