I have a struct that contains a float var. I am trying to read the value using a pointer to a struct. Here’s the code:
struct mas {
float m;
};
int main(void)
{
struct mas *ms;
ms=(struct mas*)malloc(sizeof(struct mas));
scanf("%f",&(ms->m));
printf("%f",ms->m);
return 0;
}
But running the program produces the following error:
scanf floating point formats not linked
The compiler used is Borland Turbo C++ (3.0) on a Windows PC. Why is this so?
This might be helpful: http://www.faqs.org/faqs/msdos-programmer-faq/part2/section-5.html
From the article:
Also: