MSFN Forum: [C] system() command - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[C] system() command using variables Rate Topic: -----

#1 User is offline   snake13 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 20-January 04

Posted 06 February 2004 - 02:08 PM

Ok, I'll get straight to the point. I try to use a variable in the system command (with C) and I get an error compiling. I try:
system("command %i",variable);

and it doesn't work. I try:
system(string);

and it still doesn't work. Any help would be appreciated.


#2 User is offline   Michel 

  • Group: Members
  • Posts: 2
  • Joined: 19-February 04

Posted 19 February 2004 - 06:19 AM

snake13, on Feb 6 2004, 02:08 PM, said:

Ok, I'll get straight to the point. I try to use a variable in the system command (with C) and I get an error compiling. I try:
system("command %i",variable);

and it doesn't work. I try:
system(string);

and it still doesn't work. Any help would be appreciated.

thats easy.......

sprintf (string,"%s%s, c_path, c_program)
result = system(commando);


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy