#include <stdio.h> int main() { FILE *phfile; char pstr[100]; pstr[0] = 47; pstr[1] = 47; pstr[2] = 47; pstr[3] = 47; pstr[4] = '\r'; pstr[5] = '\n'; pstr[6] = 47; pstr[7] = 47; pstr[8] = 47; pstr[9] = 47; pstr[10] = '\r'; pstr[11] = '\n'; pstr[12] = 0; fopen_s(&phfile , "ファイル名.txt" , "w+b"); if(phfile == 0) { printf(""ファイルの作成に失敗""); return -1; } fwrite(pstr , 1 , 100 , phfile); fclose(phfile); return 0; }