Created
December 11, 2012 12:23
-
-
Save myamamic/4258172 to your computer and use it in GitHub Desktop.
[C/C++] ログをSDカード上のファイルに出力(追記)する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* コンパイラ: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