#include <Windows.h>
...
std::string output_path("../Project_test/numberData");
ShellExecute(nullptr,(LPCWSTR)L"open", nullptr, nullptr, \
stringToLPCWSTR(output_path), SW_SHOWNORMAL);
...
stringToLPCWSTR的定义:
http://blog.csdn.net/jfkidear/article/details/26363711
{
size_t origsize = orig.length() + 1;
const size_t newsize = 100;
size_t convertedChars = 0;
wchar_t *wcstring = (wchar_t *)malloc(sizeof(wchar_t)*(orig.length() - 1));
mbstowcs_s(&convertedChars, wcstring, origsize, orig.c_str(), _TRUNCATE);
return wcstring;
}