C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-29-2002, 01:34 PM   #1
and the Hat of Clumsiness
 
GanglyLamb's Avatar
 
Join Date: Oct 2002
Posts: 1,101
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 ....
GanglyLamb is offline   Reply With Quote
Old 10-29-2002, 01:48 PM   #2
moi
Registered User
 
moi's Avatar
 
Join Date: Jul 2002
Posts: 945
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!
moi is offline   Reply With Quote
Old 10-29-2002, 04:19 PM   #3
and the Hat of Clumsiness
 
GanglyLamb's Avatar
 
Join Date: Oct 2002
Posts: 1,101
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
GanglyLamb is offline   Reply With Quote
Old 10-29-2002, 04:57 PM   #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?
biosninja is offline   Reply With Quote
Old 10-29-2002, 11:48 PM   #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.
shaik786 is offline   Reply With Quote
Old 10-30-2002, 03:57 AM   #6
and the Hat of Clumsiness
 
GanglyLamb's Avatar
 
Join Date: Oct 2002
Posts: 1,101
*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
GanglyLamb is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 01:28 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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