Log in

View Full Version : "round" problems


Anton
06-02-2005, 10:15
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
what ever are you talking about?

Anton
06-02-2005, 11:02
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
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:
#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:
#include <math.h>

Hope that helps :)

Anton
06-02-2005, 11:47
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?