Skip to content

Instantly share code, notes, and snippets.

@myamamic
Created December 11, 2012 12:23
Show Gist options
  • Save myamamic/4258172 to your computer and use it in GitHub Desktop.
Save myamamic/4258172 to your computer and use it in GitHub Desktop.
[C/C++] ログをSDカード上のファイルに出力(追記)する
/*
* コンパイラ:GCC 4.4.6
* だいぶ適当なので、デバッグ用に
*/
void OutputToFile(const char* msg) {
if (msg != NULL) {
FILE* file = fopen("/sdcard/output.log", "a");
if (file != NULL) {
fprintf(file, msg);
fclose(file);
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment