开发者

Question about ifstream on own executable

开发者 https://www.devze.com 2023-03-13 05:09 出处:网络
Can a program read itself using ifstream, 开发者_高级运维without some sort of corruption or failures ???Read? Yes. you get the file name as the first member of the argv array in the main parameters. M

Can a program read itself using ifstream, 开发者_高级运维without some sort of corruption or failures ???


Read? Yes. you get the file name as the first member of the argv array in the main parameters. Make sure to open for read only (ios_base::in).

0

精彩评论

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