Thread: Invoke External Programs

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    10

    Invoke External Programs

    Hi guys

    I'm wondering if it's possible to do something similar to bash scripting from C or C++

    Any simple examples would be appreciated.

    Thanks so much

    This is such a friendly and talented community!

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    30
    there's a system() function in stdlib.h

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    Any simple examples would be appreciated.
    Code:
    #include<stdio.h>
    #include<stdlib.h>
    
    int main()
    {
        system("NOTEPAD test.txt");
        
        return 0;
    }
    A simple code which fires up notepad( in my case creating a new file called test.txt) application. And obviously i am running on winXP platform

    ssharish2005

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    10
    Thank you guys very much.
    Anymore links or advanced examples would be much appreciated again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Call external C programs and receive data
    By ferenczi in forum C Programming
    Replies: 11
    Last Post: 02-12-2008, 12:32 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM