1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to execute dos commands in C++??

Discussion in 'C++' started by officespace, Feb 23, 2009.

  1. officespace

    officespace New Member

    Joined:
    Feb 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    guys i love programming in C++...i am a b.tech student...while doin a project i came across an idea of implementing dos in C++..i did search the net for it but couldnt get any solution...any experts/programmers who hav the solution plzz help me!!...thanx in advance!!
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    I'm not clear what you mean - do you want to call DOS (by which I presume you mean MS-DOS) commands from a C++ program, or are you talking about reimplementing the Command Prompt in C++?
     
  3. officespace

    officespace New Member

    Joined:
    Feb 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    yeah exactly...call a dos command from C++ program(like "dir" to giv the directories)....use the dir command in C++ to obtain the directory as we get in cmd!!..its bit crazy:D....still any chance??...thanx for the response!
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Try system()
     

Share This Page