c++ - 程序运行中止,求原因
迷茫
迷茫 2017-04-17 13:16:23
0
1
533
MaplesGraph::MaplesGraph(size_t size) : size(size), graph(size) {
    this->weights = new double *[size];
    for (size_t i = 0; i < size; ++i) {
        this->weights[i] = new double[size];
        for (size_t j = 0; j < size; ++j) {
            this->weights[i][j] = -1.0;
        }
    }
}

size 为24702, 大概分到11300左右就会中止。是因为分的内存太大的原因吗?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
Ty80

Yes. 24702 24702 8 is about 4G memory. It can be run after compiling it to 64-bit.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template