当传递带有“ *”字符的第一个参数时,fopen返回NULL

时间:2018-11-22 16:32:06

标签: c++ null stream fopen

我必须使用fopen()函数创建文件并写一些东西。但是当我使用“ *”字符传递第一个参数时; fopen()始终返回NULL。

示例:

FILE *fp
const std::string sympath ="c:\\SysData/NonStandart/SUP*------*****.png"


fp = fopen(sympath.c_str(), "wb+");

fp始终返回NULL。

我必须使用“ *”字符。我该如何解决这个问题?

OS = Windows 10和Centos7

0 个答案:

没有答案