开发者

How to close FILE* opened by _wfopen?

What's the counter part of _wfope开发者_如何转开发n? I found that there is fclose related to fopen, but it seems there is no _wfclose.


I would say fclose(), since you don't actually need anything "wide" in order to close it.


fclose().

Yup, it's that simple. It's just a file handle under the hood.


Use the normal fclose to close the handle. _wfopen only opens "wide character" - you will get the same handle back from it as fopen.


if you check here http://msdn.microsoft.com/en-us/library/yeby3zcb(VS.71).aspx

_wfopen is a wide-character version of fopen, which means that the stream opened will be the same.

therefore you can use fclose (or even _fcloseall) to close it ^^

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜