调试窗口出现一串 屯屯屯屯屯屯屯屯屯屯
大家好,写了一个简单的线性表程序,如下。但是单步调试观察变量的时候,却是一串 屯屯屯屯屯屯屯屯屯屯屯屯屯,这是咋回事?如何修改?
程序源码如下:
main.c代码
#include <stdio.h>
#include "stu.h"
#include "list.h"
ElemType stu[3]=
{
{"s101", "张三", "男", 80},
{"s102", "小虹", "女", 75},
{"s103", "王五", "男", 90}
};
int main()
{
int i;
LIST *list = NULL;
list = InitLIST();
for (i = 0; i < 3; i++)
{
InsertList(list, 1, &stu[i]);
}
FreeList(list);
}
stu.h定义代码
#ifndef _STU_H
#define _STU_H
typedef struct
{
char sno[6];
char name[30];
char sex[4];
int score;
}ElemType;
#endif
list.h定义代码
#ifndef _LIST_H
#define _LIST_H
#define LIST_INIT_SIZE 10
#define LIST_INCREME 10
typedef struct
{
ElemType *elem;
int length;
int size;
}LIST;
LIST *InitLIST();
void FreeList(LIST *l);
int InsertList(LIST *l, int i, ElemType *e);
#endif
程序源码如下:
main.c代码
#include <stdio.h>
#include "stu.h"
#include "list.h"
ElemType stu[3]=
{
{"s101", "张三", "男", 80},
{"s102", "小虹", "女", 75},
{"s103", "王五", "男", 90}
};
int main()
{
int i;
LIST *list = NULL;
list = InitLIST();
for (i = 0; i < 3; i++)
{
InsertList(list, 1, &stu[i]);
}
FreeList(list);
}
stu.h定义代码
#ifndef _STU_H
#define _STU_H
typedef struct
{
char sno[6];
char name[30];
char sex[4];
int score;
}ElemType;
#endif
list.h定义代码
#ifndef _LIST_H
#define _LIST_H
#define LIST_INIT_SIZE 10
#define LIST_INCREME 10
typedef struct
{
ElemType *elem;
int length;
int size;
}LIST;
LIST *InitLIST();
void FreeList(LIST *l);
int InsertList(LIST *l, int i, ElemType *e);
#endif
...全文
相关推荐
Visual Studio 2017 Python 调试交互窗口命令
Visual Studio 2017 Python 调试交互窗口命令 预览: 键盘快捷方式: Enter 如果显示当前提交完成,则对其进行求值。否则,插入新行。 Ctrl-Enter 在当前提交内,对当前提交求值。 在前一个提交内,将前一个提交追加到当前提交。 Shift-Enter 插入新行。 Escape 清除当前提交。
IAR EW430常用调试窗口
这一部分主要讲解一些常用的窗口。
解决vs2013 下c语言调试窗口一闪而过的代码
解决vs2013 下c语言调试窗口一闪而过的代码,本人亲自测试通过
窗口调试助手源码
vb编写的窗口调试助手,很好用。里面有源码。
gdb调试和执行窗口分离
gdb调试和执行窗口分离,示例程序-使用方式见: http://blog.csdn.net/qq123386926/article/details/50017465


