How to delete a folder in C++?

I strongly advise to use Boost.FileSystem.

http://www.boost.org/doc/libs/1_38_0/libs/filesystem/doc/index.htm

In your case that would be

boost::filesystem::remove_all(yourPath)

Leave a Comment