Hello
I'm asking for help with format in C. The code has this line:
Code:
fprintf( OUTD , "%s" , SPARAM[ i ] );
And the error is:
HTML Code:
format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘struct PARAM’ [-Wformat]
And I think you might need to know this:
Code:
/* strings used by the program */
#define NPARAM 12
struct PARAM
{
char *word;
} SPARAM[ NPARAM ] =
{
"Length ",
"Strength ",
"Frequency ",
"Criterion Used ",
"Criterion ROC ",
I've cut it short here, but I think that's enough.
I can see what the problem is, but my programming ability is very low level, and I have no idea about C. I need to change the "%s", right?
I need to get this old C code working. Fortunately, I've had some good help here, and this is the only error message left.
Comments gratefully received.
Bookmarks