wstring file;
wchar_t *data = new wchar_t[file_size+1];
fread(data, sizeof(wchar_t), file_size+1, file_stream);
file = data; // I want to create the wstring from the wchar_t data
wcout << data.size() << " " << file;
我有两个问题:
如果我在Borland C ++ Builder中运行该程序,它会在wcout崩溃(错误:“std :: bad_alloc”)并且MVSExpress 2015不显示字符串