Process finished with exit code -1073741571 (0xC00000FD)的解决方案
Process finished with exit code -1073741571 (0xC00000FD)
用clion写归并排序的时候出现了这个代码,然而代码在oj上是可以运行得到正确结果的。所以就好奇这个错误是什么原因。
网上搜了一下,错误代码对应的错误是Stack overflow,栈溢出。应该是和递归的代码有关系。看了下递归的代码:
void mergeSort(int q[], int l, int r){if (l >= r) return;int mid = (l + r) / 2;mergeSort(q, l, mid);mergeSort(q,mid + 1, r);int left = 0;int right = mid + 1;int temp[N];int k = 0;while (left <= mid && right <= r)if (q[left] < q[right]) temp[k++] = q[left++];else temp[k++] = q[right++];while (right <= r) temp[k++] = q[right++];while (left <= mid) temp[k++] = q[left++];for (int i = l, j = 0; i <= r; i++, j++) q[i] = temp[j];
}
中间有一句:int temp[N];
。这实际上就是错误的根源。在递归的函数中如果有占用空间比较大的数组的话,将其变为全局变量即可。
#include <iostream>
using namespace std;const int N = 1e5 + 10;
int q[N];
int n;
int temp[N];void mergeSort(int q[], int l, int r){...
}
这样就可以顺利运行了。
Process finished with exit code -1073741571 (0xC00000FD)的解决方案相关推荐
- python Process finished with exit code -1073741571 (0xC00000FD)
注意:本文提供的三种方法仅供参考,未必一定能解决您的问题!如别无他法,可以一试. 跑程序时遇到这样的错误代码,Process finished with exit code -1073741571 ( ...
- 解决报错Process finished with exit code -1073741571 (0xC00000FD),修改栈大小
运行程序时程序意外终止,并返回提示: Process finished with exit code -1073741571 (0xC00000FD) 导致的原因是StackOverflow(栈区溢出 ...
- 报错Process finished with exit code -1073741571 (0xC00000FD) 程序是否可以完成
这个错误代码 -1073741571 (0xC00000FD) 表示程序运行时发生了栈溢出.栈溢出通常是由于程序递归调用次数太多导致的,或者因为程序分配了太多内存导致栈空间不足. 这个错误通常不能被程 ...
- Python开启尾递归优化,解决Process finished with exit code -1073741571 (0xC00000FD)
首先,递归调用是函数调用自己本身,在计算机中,函数调用是通过栈(stack)这种数据结构实现的,每当进入一个函数调用,栈就会加一层栈帧,每当函数返回,栈就会减一层栈帧.由于栈的大小不是无限的,所以,递 ...
- PyCharm——运行错误【Process finished with exit code -1073741819 (0xC0000005)】解决方案之一
解决方案 以管理员身份运行PyCharm. 参考文章 pycharm报错:Process finished with exit code -1073741819 (0xC0000005)
- python Process finished with exit code -1073741819 (0xC0000005) 解决
运行程序时,Process finished with exit code -1073741819 (0xC0000005) 报错 原因:没有 python33.dll 在 c:\WINDOWS\sy ...
- Process finished with exit code -1073741819 (0xC0000005)
Process finished with exit code -1073741819 (0xC0000005) pycharm报错:Process finished with exit code - ...
- TENSORFLOW PROCESS FINISHED WITH EXIT CODE -1073741819 (0XC0000005)
这次报错与是否gpu没有关系: TENSORFLOW 导入失败:PROCESS FINISHED WITH EXIT CODE -1073741819 (0XC0000005) 测试脚本: impor ...
- Pycharm debug出现Qt 错误 Process finished with exit code -1073741819 (0xC0000005)
使用pycharm debug的时候出现 This application failed to start because it could not find or load the Qt platf ...
最新文章
- CommonJS规范与AMD规范的理解
- mysql5.5.42指定数据库同步操作
- 《转》VMware vSphere 5.1 学习系列之四:安装 SQL Server 数据库
- Java实现二分法(折半)查找数组中的元素
- SpringMVC学习08之SSM整合(三)
- App5.0程序导入及发布
- linux应用之----进程控制理论
- Python从键盘输入多行文本数据的方法
- jmap, jhat, jvisualvm:java堆内存对象分析利器
- 指令系统——数据寻址(1)(详解)
- 辰皇怎么过鸿蒙,诛仙3职业全面解析 各职业副本优缺点介绍
- Jquery技巧:使用ajax技术提交表单数据
- python自学要多久-python从入门到精通需要多久?你需要先明白这两个点
- 教师信息管理系统——c语言(附N-S图)
- win10锁屏账户和计算机名,如何隐藏Windows 10锁屏姓名及电子邮件地址
- 怎样查询网站关键字的排名
- tempfile.mkstemp 详解
- 【技术贴】Realtek HD声卡下QQ语音话筒没声音解决办法
- win10系统还原和重装系统一样吗?win10系统还原怎么操作?
- Bitcion Core 目录说明、使用说明、bitcoin.conf 配置说明