如何在C中将字符串存储在.txt文件中?

问题描述 投票:-1回答:1
str = cJSON_Print(cjson_test);
    printf("%s\n", str);
    FILE* fp;
    fp = fopen_s("a.txt", "w+");
    fprintf(fp, "str");
    fclose(fp);

我使用VS 2019,我不知道如何存储“ str”

c
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.