Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   "round" problems (http://www.chiefdelphi.com/forums/showthread.php?t=34096)

Anton 06-02-2005 10:15

"round" problems
 
each time I try round(something);
it says "call of function without prototype"
how can I activate the function?

Tytus Gerrish 06-02-2005 10:50

Re: "round" problems
 
what ever are you talking about?

Anton 06-02-2005 11:02

Re: "round" problems
 
Quote:

Originally Posted by Tytus Gerrish
what ever are you talking about?

I'm talking about the round(x) function
it converts floats to integers

Ryan M. 06-02-2005 11:16

Re: "round" problems
 
If it's in the math library, you have to include the header file for it. I don't remember what the library's name actually is right now, but you'll have something like this:
Code:

#include <mathlib.h>
near the top of the file where you're trying to call the function from.

EDIT: Looking it up, it's math.h, so you'll have:
Code:

#include <math.h>
Hope that helps :)

Anton 06-02-2005 11:47

Re: "round" problems
 
I already tried it, and it doesn't help. could you try it wit your code and check if it is a unique problem of mine, or maybe it is just included in a different file?


All times are GMT -5. The time now is 00:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi