execute the run command from c program ...?

This is a discussion on execute the run command from c program ...? within the C Programming forums, part of the General Programming Boards category; hi every one i'm ask who can execute the run command from c ...? like "msconfig" command that i can ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    6

    execute the run command from c program ...?

    hi every one

    i'm ask who can execute the run command from c ...?

    like "msconfig" command that i can execute from Run ....

    and I want ask some other thing can import or running audio file using c language ?

    with my respect
    Last edited by sma88; 02-21-2010 at 02:37 PM.

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by sma88 View Post
    hi every one

    i'm ask who can execute the run command from c ...?

    like "msconfig" command that i can execute from Run ....
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main()
    {
       char cmd[256];
       printf( "Enter a command to run: " );
       fgets( cmd, 255, stdin );
       return system( cmd );
    }
    If you want it in a GUI, you'll have to figure that out yourself.

    Quote Originally Posted by sma88 View Post
    and I want ask some other thing can import or running audio file using c language ?

    with my respect
    I don't have a clue.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    18
    Quote Originally Posted by sma88 View Post
    and I want ask some other thing can import or running audio file using c language ?
    Check out this link Simple DirectMedia Layer (SDL library)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. triggering another program to run using serial port
    By infineonintern in forum C++ Programming
    Replies: 3
    Last Post: 07-22-2009, 06:16 AM
  2. Help on making program run more efficiently
    By peeweearies in forum C Programming
    Replies: 2
    Last Post: 03-23-2009, 03:01 AM
  3. Replies: 2
    Last Post: 07-27-2007, 01:48 PM
  4. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  5. This is how to get your program to run fullscreen (console)
    By Raigne in forum Windows Programming
    Replies: 11
    Last Post: 11-25-2005, 08:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21