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. Advertisements

  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. Advertisements

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,535
    Eliyahu Goldin
    Jun 22, 2005
  2. Daniel Portal

    Executing DOS commands from ASP.NET

    Daniel Portal, Nov 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,781
    Lau Lei Cheong
    Nov 19, 2005
  3. jlc488
    Replies:
    1
    Views:
    698
    Andrew Thompson
    Jan 21, 2005
  4. PW

    DOS commands in HTML ?

    PW, May 11, 2004, in forum: HTML
    Replies:
    12
    Views:
    6,853
    davidgreenwood.me.uk
    Jun 25, 2007
  5. Ben Fairbank
    Replies:
    2
    Views:
    5,762
  6. john san
    Replies:
    19
    Views:
    1,056
    Diez B. Roggisch
    Feb 18, 2005
  7. tomhr
    Replies:
    27
    Views:
    1,732
    Mike Wahler
    Jan 12, 2006
  8. Robert Wallace

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

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