Thread: system();

  1. #1
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110

    system();

    im using lcc-win32 compiler
    program runs under dos
    this is my problem => i want to work with system();
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main()
    	{
    		int system();
    		system(" ren C:\\lamb.txt lamb.lamb");
    		return 0;
    	}
    now this thing works on my computer but if i send it to other ppl it wont work it will only work on the comp where it has been compiled =>is this because of the compiler or is system(); just like that ....

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    comments:

    lcc-win32 produces win32 executables. your programs are not running under dos.

    why do you prototype system()? just include the proper header file.
    hello, internet!

  3. #3
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110

    Unhappy

    i use lcc i include the proper header file according to the help thing in lcc its stdlib.h it works perfect on my comp but not on another comp so ... i just wanna know how that comes

  4. #4
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Well, does the "others" have the same file and in the same location on their pc?

  5. #5
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    What is the error message you are getting on the other machines? Paste it here.

  6. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    *in the example i use ren of rename but i also did this with md (make directorie) and this works on my comp but not on another
    then i thoughtmayb i must take a directory wich evry one has so i said ill make a map in c:\windows\desktop now this wont work as well so ... it has nothing to do with a certain file that doesnt exists or a directory who doesnt exist

    *and about the error it appears that the application just shuts down and that it doesnt give an error
    * someone also said why do u prototype system(); =>because if i dont lcc gives an error and then it wont compile

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