存储目录位置
Store directory location
我试图在ram中存储目录位置,以便我可以稍后在应用程序中访问它。我的目标是实现这段代码:
ContentManager.GetDir();
ContentManager.SetDir("../Content/");
我现在很困惑,需要一些帮助!
将路径存储在std::字符串中或使用boost::filesystem: http://live.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm
文件系统:
path dirLocation = "c:\mydirectorylocation";
if(exists(dirLocation) && is_directory(dirLocation))
{
std::string myPath = dirLocation.string();
}
相关文章:
- 我的目标是编写一个程序来计算和存储字符串在字符数组中出现的位置
- 为什么存储在内存位置的值会发生变化?
- 可变存储位置
- 将光标位置存储在类对象中(ncurses c++)
- 如何确定 SQLite 文件在 QML LocalStorage 中的存储位置
- 为同一存储位置调用构造函数两次是否合法?
- 原子功能无锁可以更改两个独立的存储位置
- NetUsergetLocalGroups()返回存储位置而不是LPWSTR字符串
- C++每个变量的存储位置是否正确?
- 存储位置作为放大动态数组中的最后值
- 动态分配存储数据在堆中的随机位置中
- 可视C 编译器将相同的存储位置提供给两个变量
- 存储unordered_map的位置
- 如何使用矢量或地图存储不同角色的位置
- 如何比较和存储 2 个向量的数据元素位置
- 存储类对象的C++模板链表-未处理的异常访问冲突读取位置
- 在声明中可以放置存储类说明符的位置
- C++阵列在内存中的存储位置
- 可视化 C++构造函数的存储位置
- 相同的内存位置存储两个不同的值