I am trying to port a DOS batch script to C. Whenever I try to use a system call with a variable, I get an error. For example, here is what I am doing:

Code:
char IP[15];

scanf("%s", &IP);

system("ping IP");
I usually get an error stating that IP is not defined or known. Can anyone shed any light?


Thanks.


-KiaiViper