如何在 C++ 中创建临时目录? [英] How to create a temporary directory in C++?
本文介绍了如何在 C++ 中创建临时目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在用 C++ 编写一个函数来创建一个临时目录.这样的功能应该尽可能的便携,例如它应该可以在 linux、mac 和 win32 环境下工作.我如何做到这一点?
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 environments. How do I achieve that?
推荐答案
检查 mkdtemp
函数 此处.
这篇关于如何在 C++ 中创建临时目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文