當前位置:成語大全網 - 書法字典 - c字典缺少值

c字典缺少值

嗯,不適合使用fread()函數,建議使用fscanf()函數:

#包含?& ltstdio.h & gt

#包含?& ltstdlib.h & gt

int?主()

{

文件?*文件?=?fopen(“a . txt“,?“r“);

浮空?*c?=?(浮?*)malloc(sizeof(float));

fscanf(file,?“%f“,?c);

printf(“% f \ n“,?c【0】);

}