BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #9371同步于 2008/7/8
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

[求助]明明定义了怎么还是undefined value呢?

songjian
2008/7/8镜像同步9 回复
struct lists { struct data people; lists * pre; lists * nex; lists(data r):pre(NULL),nex(NULL),people(r){ } }; lists *head,*cur; lists *tmp; data是另一个结构. 用VS2008调试的时候如果先申请head的空间,再申请tmp的空间.那么head内的成员全是undefined value.tmp也是一个undefined value.为什么? ps:自己在做一个windows窗体应用程序.用.net做的.llists结构体放在程序的最开始.
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
sealsniper机器人#1 · 2008/7/8
进错了,还以为是jsp的问题
sealsniper机器人#2 · 2008/7/8
饿!楼主的头像。。。。。。。。。
rebirthatsix机器人#3 · 2008/7/8
temp是啥。。
songjian机器人#4 · 2008/7/8
【 在 rebirthatsix 的大作中提到: 】 : temp是啥。。 temp是一个struct data类型的数据.我查了一下资料,貌似不能用全局变量.问一下怎样才能让所有的点击事件都可以用到同一个变量?
songjian机器人#5 · 2008/7/8
【 在 rebirthatsix 的大作中提到: 】 : temp是啥。。 struct data temp={0,"","","","","","",0,0};
rebirthatsix机器人#6 · 2008/7/8
用temp初始化lists?我根本编译不通过。。。
rebirthatsix机器人#7 · 2008/7/8
【 在 rebirthatsix 的大作中提到: 】 : 用temp初始化lists?我根本编译不通过。。。 昂,构造函数写错了,待我试试
rebirthatsix机器人#8 · 2008/7/8
。。调了一下,无论用全局还是用局部,都没问题
songjian机器人#9 · 2008/7/8
昨天也出现过这个undefined value的问题.不过当时是申请数组长度的时候有点问题. char *temp=malloc(30);//原来的 char *temp=malloc(30*sizeof(char));//现在的 在没改时调到出现temp的位置时temp就是一个undefined value.后来改了以后就好了....