2011-05-05 59 views
0

我试图在ram中存储一个目录位置,以便稍后可以在我的应用程序中访问它。我的目标是实现这段代码:存储目录位置

ContentManager.GetDir(); 
ContentManager.SetDir("../Content/"); 

我对此刻感到困惑,可以使用一些帮助!

+2

变量存储在RAM中。你有什么问题? – StackedCrooked 2011-05-05 20:56:58

回答

0

Boost.Filesystem的:

path dirLocation = "c:\\mydirectorylocation"; 
if(exists(dirLocation) && is_directory(dirLocation)) 
{ 
    std::string myPath = dirLocation.string(); 
}