#include <cstdlib>
#include <dirent.h>
#include <fstream>
#include <io.h>
#include <iostream>
#include <openssl/sha.h> // 引入openssl库
#include <string>
#include <sys/stat.h> // sys/stat.h头文件用于获取文件信息
#include <windows.h>
using namespace std;
int main()
{
wstring a1 = L"第一行文字";
wstring a2 = L"第二行文字";
wstring* b = new wstring;
b[0] = a1;
b[1] = a2; //说的是这里
return 0;
}
这段代码在运行时会报错,提示信息为
引发了未经处理的异常:读取访问权限冲突。
_Val 是 0xFDFDFE05。
wstring* b = new wstring[2];
b[0] = a1;
b[1] = a2; //说的是这里