Thread: system

  1. #1
    Registered User deleeuw's Avatar
    Join Date
    Aug 2001
    Posts
    31

    Question system

    hey all,

    can one use variable in the system command?

    ex:

    # include <stdlib.h>

    main(){

    char x[4];
    cin>>x;
    system(x".exe");
    }

  2. #2
    Unregistered
    Guest
    sprintf(DosCommand, "Copy text9.exe %s.exe", RndWords);
    system(DosCommand);

  3. #3
    Registered User deleeuw's Avatar
    Join Date
    Aug 2001
    Posts
    31

    system

    OK, thanks.

    But whati f you're in Unix? Obviously, one wouldn't be using .exe.
    But one would one use instead of DosCommand?

    777

  4. #4
    Unregistered
    Guest
    doscommand is a varialbe... i called doscommand for the hell of it... you can call it anything

    eg: unixcommand, linuxcommand, retardcommand, happyman

    anything at all

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File System Implementation
    By dodgeviper in forum C Programming
    Replies: 9
    Last Post: 11-16-2007, 01:04 PM
  2. Using system icons
    By @nthony in forum Windows Programming
    Replies: 1
    Last Post: 01-13-2007, 07:56 PM
  3. Linux database system needed
    By BobS0327 in forum Tech Board
    Replies: 7
    Last Post: 06-11-2006, 03:56 PM
  4. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 07:12 AM
  5. Number system base M, print numbers N digits wide...
    By biterman in forum C Programming
    Replies: 12
    Last Post: 11-19-2001, 04:31 AM