#if _MSVC_LANG < 201703L // /std:c++17
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#include <filesystem>
namespace fs = std::filesystem;
#endif
std::wstring StringToWString(const std::string& str)
{
fs::path p = str;
return p.wstring();
}
std::string WStringToString(const std::wstring& wstr)
{
fs::path p = wstr;
return p.string();
}
已有1257位网友发表了看法:
发表评论