【发布时间】:2012-09-11 09:22:43
【问题描述】:
我收到错误 scanf: 浮点格式未链接 同时读取以下结构的“信息”的值。
struct node
{
float info; struct node *next;
}*start;
在main()中
void main()
{
struct node *temp;
temp = (struct node*)malloc(sizeof(struct node));
printf("enter data = ");
scanf("%f",&temp->info);
}
它没有读取该 scanf 的任何值并退出程序。
如何解决这个问题?
【问题讨论】:
-
天哪 - 可怕的古老而破旧的 Turbo C。
-
感谢@cnicutar,这对我有帮助。