Thread: System Calls

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    System Calls

    With C how could I use system calls (in Windows) to launch, stop, and restart another program say when my program is done running... like the last line or code, or even if I could do it while my program is still running.

    Also if someone could tell me how to delete a file with a C function... in Windows.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    22

    Thumbs up System Calls

    hey man,
    is it Turbo C?
    u can use system(const char *command);
    by this u can run another program from your C program--but it is not the best way.
    u have to call interrupt to run system prog and while running your prog.
    thanx...
    take care...
    _________
    Jackie

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Just C

    Not turbo C just C

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Turbo C is just a compiler and Jackie is right.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    22

    just C !!??

    hey Jperensky,
    there is no sentence like 'JUST C(!!??!!??)'.
    u r using a editor and compiler and i only want to know about your compiler, cause i am using Turbo C compiler.

    thanx...
    take care...
    _________

    MAN IS NOT IMMORTAL...
    BUT ART IS IMMORTAL....

    _________
    jackie.
    Jackie

  6. #6
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Turbo C

    I'm sorry i thought you were asking if I was using a differnt for of c like C# or something... I am using notepad as my editor and Digital Mars compiler as my compiler....

  7. #7
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    The function system is ANSI C, so if you're compiler is an ANSI compiler, it should support the function.

    #include <stdlib.h>
    int system(const char *string);

    You are using notepad as editor? Why not download a programmer's editor? Take a look at:

    http://www.thefreecountry.com/develo.../editors.shtml

    There's a lot of free editors there and they're quite good.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic system calls help.
    By AmbliKai in forum C Programming
    Replies: 5
    Last Post: 03-21-2008, 07:18 AM
  2. Opinions on custom system build
    By lightatdawn in forum Tech Board
    Replies: 2
    Last Post: 10-18-2005, 04:15 AM
  3. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  4. School Mini-Project on C/C++ (Need Your Help)..
    By EazTerence in forum C++ Programming
    Replies: 4
    Last Post: 09-08-2005, 01:08 AM
  5. System Calls && Variables
    By Okiesmokie in forum C++ Programming
    Replies: 6
    Last Post: 03-06-2002, 09:10 PM