Image_write_to_file types

Why is the type of the file argument filename, that we pass to the function image_write_to_file, of type const char* but not FILE*, since it is a file, isn’t it? Am I not supposed to pass a FILE* here or do I have to do something with it before passing it?

It’s the path to a file. Open it with fopen. Do not forget do fclose it again.

2 Likes