Problem scenario
You compile a C program (with gcc foobar.cc) but you get an error message like this:
“foofbar1.cc:71…: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘int’ [-Wformat=]
printf (“y is a %s\n”, y);
^ “
What do you do to not get this error?
Solution
While the code compiles, the executable may not run.
…