#3 printf %d of a string

open
nobody
None
5
2011-10-19
2011-10-19
Clem Wang
No

The compiler gives correct warning:
model.cpp:240: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘const char*’

The code is:

printf("Cannot open file %d to load model!\n", filename.c_str());

and it should be

printf("Cannot open file %s to load model!\n", filename.c_str());

Discussion