Anyone know of a possible reason why fprintf maynot work for me when using the android NDK?
FILE * f = fopen("/sdcard/newfile.txt", "w+");
fprintf(f, "testing\n");
I do have the write external storage permission in the android manifest. And this code creates a file newfile.txt but it’s empty.
Is there anything else that has to be done to let me write stuff to a file?
I think you have to close the stream with something like “fclose”: