i defined
on this line i getCode:char opt[254];
|55|warning: char format, different type arg (arg 2)|
what that means??Code:scanf("%s",&opt);
i defined
on this line i getCode:char opt[254];
|55|warning: char format, different type arg (arg 2)|
what that means??Code:scanf("%s",&opt);
&opt is not a pointer to char, which you need for the %s format specifier. You should use a pointer to char (in this case, "opt").
and as a side note - you should limit a number of chars that could be read by the format - to prevent buffer overrun
scanf("%253s",opt);
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
what will happen to the program if the user will enter 254 chars?
Your head will twist right off your body, and zoom into outer space!!
Try it and see.
The program will format your hard drive, too!
http://apps.sourceforge.net/mediawik...Buffer_overrun