gpt4 book ai didi

c - scanf:浮点格式未链接

转载 作者:太空狗 更新时间:2023-10-29 15:36:28 24 4
gpt4 key购买 nike

<分区>

我收到错误 scanf: 未链接浮点格式 在读取以下结构的“信息”值时。

struct node
{
float info; struct node *next;
}*start;

在主函数中

void main()
{
struct node *temp;
temp = (struct node*)malloc(sizeof(struct node));
printf("enter data = ");
scanf("%f",&temp->info);
}

它没有读取该 scanf 的任何值并从程序中出来。

如何解决这个问题?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com