Sunday, March 25, 2018

C++ Array Declaration Stack Overflow Exception

Error: Stack overflow when declaring a huge array in C++.

Unhandled exception at 0x00007FF60B7040C8 in Tutorial.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x00000081A80D3000). occurred


Problem code:

#include <iostream>
#include <fstream>

int main()
{
    //do something..

    int nar[10000000];

    //do something more..

    return 0;
}