如何解決這個錯誤,當我運行和關閉這個項目? 我寫了一個C++程序,它有這個錯誤: 觸發了一個斷點。C++錯誤:<project_name>觸發了一個斷點
int num = 0;
string **board = new string*[num];
cin >> num;
system("cls");
for (int i = 0; i < num; i++)
board[i] = new string[num];
for (int i = 0; i < num; i++)
for (int j = 0; j < num; j++)
board[i][j]='_';
for (int i = 0; i < num; i++)
{
if(i!=0)
cout << endl<< endl<<endl<< endl;
for (int j = 0; j < num; j++)
cout << board[i][j]<<" ";
}
cin.get();
cin.get();
for (int i = 0; i < num; i++)
delete[] board[i];
delete[] board;
return 0;
你能發佈確切的錯誤嗎? – Danieboy
wntdll.pdb不包括 –