c - "too many arguments for format" warning - Stack Overflow
stackoverflow.com › questions › 29905479Apr 27, 2015 · 1 Answer. Sorted by: 4. Your format specifier "The answer is %d"" " is for one argument, but you pass two, path (arr, u, v) and ". ": printf ("The answer is %d" " ", path (arr, u, v),". "); Presumably you need. printf ("The answer is %d. ", path (arr, u, v)); Share.
too many arguments for format [-Wformat-extra-args]
readforlearn.com › too-many-arguments-for-format-wtoo many arguments for format [-Wformat-extra-args] Your fprintf call has 8 format specifiers but passes 9 further arguments to fill these. The 8th format specifier is %d; the argument corresponding to this is Item [i]->Name. The warning is telling you that Item [i]->Name is a string so can’t (shouldn’t) be converted to a signed integer. I presume Item [i]->Price has type int; you then either need to add an extra %s to your format string (anywhere before the %d) or remove one of the ...