I was trying to write a program. i finished and it's giving me this aquard error. does anyone know WHAT IT MEANS?
Error in turbo C program: "illegal use of floating point in function main"?
No one can help you if you don't post the source code and the exact error (with the line number).
Reply:Here's some sample code that will generate the "illegal use of floating point in function main" error in a specific environment...can you see the error?
int dollar, cents;
printf("Enter the amount of change you need: ");
scanf("%lf", %26amp;dollar);
... the coder has told scanf() to scan a float "%lf" into an integer address (%26amp;dollar).
You might look for a similar mismatch in your code. Like another poster stated, hard for us to tell if you don't show the code.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment