33,311
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main()
{
FILE* fplog = fopen("test.txt", "a+");
char * str="test\r\n";
fwrite(str,1,strlen(str),fplog);
fclose(fplog);
return 0;
}
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main()
{
FILE* fplog = fopen("test.txt", "a+");
char * str="test\\r\\n";
fwrite(str,1,strlen(str),fplog);
fclose(fplog);
return 0;
}