You need to review how
is used: printf, fprintf, sprintf, snprintf, printf_s, fprintf_s, sprintf_s, snprintf_s - cppreference.com
In general printf() looks like
int printf(const char *format_string, arg1, arg2, ...);
describes the other arguments. So for example a format string of
will treat the next argument as a integer, regardless of what it actually is. It is up to you
, as the programmer to get things right. Fortunately, these days compilers are "printf aware" and can usually spot a problem and issue warnings as needed.
In your case you have
The warning you are getting is telling you that you are trying to convert the value of
, which is an int with value 10 to a pointer type (char *), so its as if you wrote
a character string, so the compiler is letting you know that something is not right.