Link to home
Start Free TrialLog in
Avatar of sudarshantk
sudarshantkFlag for India

asked on

Compile errors...

Could you please let me know ho to fix this error...

386: fprintf(fp, "\t<command cmd=/"%s/">\n", command);

file should contain this  -> <command cmd=”authorizationFailure” >   

simba.c:386: `s' undeclared (first use in this function)
simba.c:386: (Each undeclared identifier is reported only once
simba.c:386: for each function it appears in.)
make: *** [simba.o] Error 1


     
ASKER CERTIFIED SOLUTION
Avatar of cwwkie
cwwkie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nafis_devlpr
nafis_devlpr

the above solution is alright, you can also try this

fprintf(fp, "\t<command cmd=%c%s%c>\n",'\"', '\"', command);
>> fprintf(fp, "\t<command cmd=%c%s%c>\n",'\"', '\"', command);

only when you put the arguments in the right order ;-)

fprintf(fp, "\t<command cmd=%c%s%c>\n", '\"', command, '\"');
yeah you are right buddy, sorry, it should be like this

fprintf(fp, "\t<command cmd=%c%s%c>\n", '\"', command, '\"');
Alternatively if you are working in ASCII (solution may be different if you are working in EBCDIC)

fprintf(fp, "\t<command cmd=\042%s\042>\n", command);