How to delete a folder in C++?

后端 未结 16 1325
悲&欢浪女
悲&欢浪女 2020-12-03 00:45

How can I delete a folder using C++?

If no cross-platform way exists, then how to do it for the most-popular OSes - Windows, Linux, Mac, iOS, Android? Would a POSIX

16条回答
  •  离开以前
    2020-12-03 01:05

    The directory must be empty and your program must have permissions to delete it

    but the function called rmdir will do it

    rmdir("C:/Documents and Settings/user/Desktop/itsme") 
    

提交回复
热议问题