C <地址 0x53 越界> 错误

标签 c indexoutofboundsexception

void findWay(int column,int sum,char *array,int s,stack_t sta)
{
 if(array[s+column+2]=='0')
{

当我调试程序时,我收到一个错误,即“Address 0x53 out of bounds”(if(maze[s+column+2]=='0') 在此行)。为什么?

有人请帮助我。

最佳答案

因为 s+column+2 超出了数组的边界,你需要为 array 分配更多的内存或者确保你没有超出分配的内存.

关于C <地址 0x53 越界> 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13532965/

相关文章:

c - C 中链表的逻辑错误

c - 将结构作为空指针传递给函数

C、数学字符串计算?

java - LibGDX 当敌人重叠时让一颗子弹只杀死一个敌人

java - try catch 循环(InputMismatchException 和 ArrayIndexOutOfBoundsException 之间的区别)

android - 转换从 Android 中的 BufferedReader 读取的 char[] 时出现 StringIndexOutOfBoundsException

c - 为什么只有一个线程可以工作?

c - 制作高度图的替代方法

android - android galaxy的真实设备数据库文件为空点异常

java - ArrayAdapter - 如何停止 getView 调用?