Thread: Use of DOS Command

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    3

    Question Use of DOS Command

    Hi All,
    Please bare with me, I have recently started learning C and have hit a sticking point,

    I am using TCLite to edit, compile etc .. excellent in my limited opinion, however i seem to be unable to use the System command

    e.g system("dir");

    but nothing happens, the rest of the program runs fine, it just completely ignores the line, no errors or warnings - I have tried it with various command all the same result.
    I follow the syntax in the help files for TClite but to no avail
    Can anyone give me guidance?
    Thanks in advance for any help!

    Fazzawa



    "Remember No Plan of Action Ever Survives Contact With The User!":

  2. #2
    Registered User
    Join Date
    Oct 2002
    Posts
    3
    Oh damn, why am I not surprised
    Thanks for the links and taking the time to reply & have a good one

    Fazzawa

  3. #3
    template<typename T> threahdead's Avatar
    Join Date
    Sep 2002
    Posts
    214
    what header do i have to include for the system() function?

  4. #4
    Registered User
    Join Date
    Oct 2002
    Posts
    3
    You need either

    process.h
    or
    stdlib.h
    Hope you have more luck than me friend,
    have a great one




  5. #5
    template<typename T> threahdead's Avatar
    Join Date
    Sep 2002
    Posts
    214
    the stdlib.h header worked fine for me.

    thanks!


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. Can I issue a command to DOS from within a program?
    By Sukarn in forum Windows Programming
    Replies: 2
    Last Post: 12-22-2006, 07:44 AM
  3. Executing DOS command in C
    By m.sudhakar in forum C Programming
    Replies: 3
    Last Post: 07-22-2006, 02:52 PM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. Command Line Variable Passing (like in DOS)
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 08-31-2002, 07:31 AM