Clion exit code -1073741571 (0xC00000FD)

前端 未结 1 542
春和景丽
春和景丽 2020-12-21 20:13

I get a weird exit code in clion:

exit code -1073741571 (0xC00000FD)

This is my code:

int main()
{
    std::cin.         


        
相关标签:
1条回答
  • 2020-12-21 20:33

    The error number 0xC00000FD stands for "stack overflow" (I suppose your platform is Windows). Under Windows local variables are allocated on the stack (as on most other platforms too) and int arr[30007][5] is pretty big (30007 * 5 * 4 = 600140 bytes) and stacks are usually rather small (typically around 1 Mb, again platform dependant)

    You have many options:

    1. use std::vector instead of raw arrays (preferred)
    2. declare the array as static (static int arr[30007][5];), then it won't reside on the stack anymore
    3. increase the stack size of your executable. This is highly platform/too dependant.
    4. allocate the array dynamically
    0 讨论(0)
提交回复
热议问题