i'm having a problem with floats.
and set bar is defined like this:
int a, b;
if (a == b)
percentage = a/(a+b);
// check here
but percentage is never a float. if i check it right after i set it (the comment "check here") or within the function setbar, it's either 0 or 1, like it's just an int. the only time it works is if a==b, in which case i tell it to pass 0.5 as the argument. The one thing i notice is that whenever b != 0, percentage is always 0, leading to the conclusion that a/(a+b) is doing the same thing as (int)(a/(a+b))
what am i doing wrong?