我正在创建一个动态二维数组并分配它.我的for循环在10-15次运行后出错(每次都不是相同的值),分配错误.任何帮助,将不胜感激.
__int32 aLarge = 8121432;
__int32 bLarge = 8121784;
ActualPosition** myPositions;
myPositions = new ActualPosition*[aLarge];
for (int x = 0; x < aLarge; x++)
{
try
{
myPositions[x] = new ActualPosition[bLarge];
}
catch (bad_alloc& ba)
{
// Error here
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
35 次 |
| 最近记录: |