C/C++の宿題を片付け ..
116:デフォルトの名無しさん
08/12/17 06:53:50
>>114 UNIX環境だとどちらも違いでないな
#include <stdio.h>
#include <string.h>
int main()
{
char *s = "we will complete your home work!\n";
FILE *fb = fopen("data.bin", "wb"), *ft = fopen("data.txt", "w");
fwrite(s, sizeof(char), strlen(s), fb);
fprintf(ft, "%s", s);
return 0;
}
次ページ最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4942日前に更新/118 KB
担当:undef