Help me pls

  • Thread starter Thread starter infinitE
  • Start date Start date
I

infinitE

I'm a beginning c++ programmer and i need help making a win32 consol
application, that when run, brings up the command promt. How would i g
about maing the code for this


-
infinit
 
infinitE said:
I'm a beginning c++ programmer and i need help making a win32 console
application, that when run, brings up the command promt. How would i go
about maing the code for this?

I hope this isn't a homework assignment. :-)

The hack below starts the usual command processor (cmd.exe), has it execute
the "list directory" command and tells it to wait for further input "/K".

Regards,
Will

#include <windows.h>

int main()
{
system("cmd.exe /K dir\r\n");

return 0;
}
 
Back
Top