当我尝试调试时出现错误:“最终 project.exe 中 0x5784F2F6 (ucrtbased.dll) 处的未处理异常:无效参数已传递给认为无效参数致命的函数。” 尝试了一切无法弄清楚如何解决这个问题。
using namespace std;
class Map :
{
private:
double *mhours_played;
string *maps;
unsigned element_num;
public:
Map()
{
maps[2] = { "Summoner's rift", "Aram" };
element_num = 2; mhours_played[2] = {};
}
~Map() { delete[] maps; }
};