cjf19921001
Sebastian丶
2017-10-25 05:53

为什么fopen打开失败呢?

  • fopen

bool Creat_Text(const char* str, const char* filename)
{
char path[1024] = {0};
GetCurrentDirectory(1024, (LPWSTR)path);
strcat(path,"//");
strcat(path,filename);

FILE* fp = fopen(path,"a+");
if (NULL == fp)
{
    return false;
}

fputs(str,fp);

fclose(fp);
return true;

}_

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答