- This topic has 2 replies, 3 voices, and was last updated 18 years, 10 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › i got problem at system() function usage
I am trying to use system function in my code but when i compile the code it comes out from program and displays a dialog box as”illigal operation”
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h><br /> #include<stdlib.h><br /> void main()<br /> {<br /> system("mkdir d:\naveen");<br /> }<br /> ex2:<br /> #include<stdlib.h><br /> #include<stdio.h><br /> void main()<br /> {<br /> system("dir");<br /> } |
Wel if you are using win 98 or win 95 then it should work fine. If you are using windows 2000 or XP then the code above will give the error.
Check to see if this function is returning -1, if yes then means this function have some errors while executing.
It’s because of the improved security in Windows XP or Windows 200. The functions like
does not work on an NT platform.
There may be some other problems, but I think using win 98 would resolve the problem.