How to create a temporary directory in C++?

后端 未结 6 1109
情歌与酒
情歌与酒 2020-11-30 11:52

I\'m writing a function in C++ which creates a temporary directory. Such function should be as most portable as possible, e.g. it should work under linux, mac and win32 envi

6条回答
  •  天涯浪人
    2020-11-30 12:19

    Boost's Filesystem library provides platform-independent directory functions. It will increase your program size a bit, but using Boost is often better (and often easier) than rolling your own.

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

提交回复
热议问题