c语言 data 0x1,The thread 0xC5C has exited with code 1 (0x1).什么问题

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

用C语言建的win32 console application ,头文件DataStructure定义好了,代码如下:

#include "DataStructure.h"

#include

#include

#define MAXSIZE 100

typedef int ElemType;

typedef struct{

ElemType *elem;

int length;

}SqList;

Status InitList_Sq(SqList &L) {

L.elem=new ElemType[MAXSIZE];

if(!L.elem) exit (OVERFLOW);

L.length=0;

return OK;}

Status ListInsert_Sq(SqList &L,int i,ElemType e)

{ if((i<1)||(i>L.length)) return ERROR;

if(L.length==MAXSIZE) return ERROR;

for(int j=L.length-1;j>=i-1;j--)

{L.elem[j+1]=L.elem[j];}

L.elem[i-1]=e;

++L.length;

return OK;}

int main()

{SqList sq;

int num,e;

InitList_Sq(sq);

scanf("%d",&num);

for(int i=1;i<=num;i++)

{scanf("%d",&e);

ListInsert_Sq(sq,i,e);

}

printf("\n");

for(i=1;i<=sq.length;i++)

{

printf("%d",sq.elem[i-1]);}

return OK;

}

为什么执行的时候输入5 1 2 3 4 5会闪退,出现如下字样:

Loaded 'ntdll.dll', no matching symbolic information found.

Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.

The thread 0xC5C has exited with code 1 (0x1).

The program 'F:\VC作业\Exam1\Debug\Exam1.exe' has exited with code 1 (0x1).

这个老师说可能是项目建错了,百思不得其解,困扰了几个小时了,求学长们解答

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值