STD :: FSTREAM / STD ::文件系统创建使用重复号码的文件
我想在文件末尾创建一个带有数字的文件: fileName(编号转到此处).txt
。该号码会告诉我目录中是否有文件的重复项,创建了文件:filename.txt
。
示例:helloworld(1).txt
Windows尝试创建文件重复时也具有此功能。我可以在C ++ 17中这样做吗?
I want to create a file with a number at the end of the file :filename ( number goes here ).txt
. The number will tell me if there were duplicates of the file in the directory the file was created : filename.txt
.
Example : helloworld (1).txt
Windows also has this functionality when trying to create a file duplicate. Is there way I could do this in C++ 17 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于没有人给我任何答案,我决定花一些时间在这个函数上,它可以做我想要的事情,并回答我自己的问题,它在 C++ 17 中,对于任何认为这有用的人:
Since no one is giving me any answers, I decided to spend some time on this function that does what I want , and answer my own question , its in C++ 17 for anyone who thinks this is useful :