I want to remove the warning that i get on this line of the code,
FILE *fil;
char *imp;
(...)
fprintf(fil,imp);
the thing is when i do thi
I think the accepted answer explained it very well. Basically, as the documentation also indicates, the compiler can not guarantee that the string variable (in this case imp) is a string literal. You may disable this warning if you are not concerened with safety by puting
#ifdef _WIN32
#pragma warning (disable : 4774)
#endif
in the header of your code or in the CMake:
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_C_FLAGS "/wd4774")
endif()