基于c++14
标准
#include<experimental/filesystem>
int main()
{
std::string save_dir("D:\\hello");
std::string txtfileName(type + "_userName_" + user_name + "_userId_" + user_id + ".txt");
std::experimental::filesystem::path combinedPath(save_dir);
combinedPath /= txtfileName;
std::string infor_save_path = combinedPath.string();
return 0;
}