FILE* file = fopen("/sdcard/hello.txt","w+"); if (file != NULL) { fputs("HELLO WORLD!\n", file); fflush(file); fclose(file); }
Dont forget to place a permission for it. in the Android manifest place a
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">;
http://stackoverflow.com/questions/1992953/file-operations-in-android-ndk
沒有留言:
張貼留言