sudarshantk
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> 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, '\"');
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, '\"');
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);
fprintf(fp, "\t<command cmd=\042%s\042>\n", command);
fprintf(fp, "\t<command cmd=%c%s%c>\n",'\"', '\"', command);