返回信息流#include<stdio.h>
struct leaf{
int c;
char *name;
struct leaf *lc;
struct leaf *rc;
};
main()
{
int *n,m;
struct leaf *root,*end;
root=(struct leaf * )malloc(sizeof(struct leaf));
end=(struct leaf* )malloc(sizeof(struct leaf));
scanf("%d",&root->c);
scanf("%d",&end->c);
printf("%d\n%d",root->c,end->c);
}
程序如上,root->c,end->c无论输入什么,输出都相同呢?
这是一条镜像帖。来源:北邮人论坛 / cpp / #7749同步于 2008/5/29
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
请高人指点迷津,为什么两个输出相同呢?
xiaowei
2008/5/29镜像同步12 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
举个例?
【 在 xiaowei (风之子) 的大作中提到: 】
: #include<stdio.h>
: struct leaf{
: int c;
: ...................
我的是vc6.0
【 在 silentime 的大作中提到: 】
: 试验了一下,没问题啊
: 4 5
: 4
: ...................