Send DOS Commands from VC++

Discussion in 'C++' started by Dave, Jun 29, 2003.

  1. Dave

    Dave Guest

    How do I send a dos command from a SDI type application?

    Win2k, VC6.
    Thanks
    Dave
    Dave, Jun 29, 2003
    #1
    1. Advertising

  2. Dave

    MiniDisc_2k2 Guest

    Put this post in microsoft.public.vc.mfc.

    For those who are using standard C++ (just thought I'd get this out):

    to send a dos command all you need to do is

    system(command);

    where command is a char* (c-style string) which contains the command you
    wish to do, i.e. this:

    system("dir");

    or (perhaps the most commonly used one)

    system("pause");

    -- MiniDisc_2k2
    to reply, replace nospam.com with cox dot net.

    P.S. I believe that the system() function should still work in your SDI
    program.
    MiniDisc_2k2, Jun 29, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DB
    Replies:
    2
    Views:
    1,413
    Eliyahu Goldin
    Jun 22, 2005
  2. Ben Fairbank
    Replies:
    2
    Views:
    5,403
  3. john san
    Replies:
    19
    Views:
    728
    Diez B. Roggisch
    Feb 18, 2005
  4. tomhr
    Replies:
    27
    Views:
    1,400
    Mike Wahler
    Jan 12, 2006
  5. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    266
    Michele Dondi
    Jan 22, 2004
Loading...

Share This Page