Remove file in C++ under UNIX

前端 未结 5 948
悲&欢浪女
悲&欢浪女 2021-02-07 00:46

How do you guys typically delete files on Linux OS? I am thinking of using the unlink function call, but I wonder if you have a better idea, as the C++ standard has

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 01:31

    unlink() is defined by the POSIX standards, and hence will exist on any POSIX compatible system, and on quite a few that aren't POSIX compatible too.

提交回复
热议问题