Multiplying/dividing floating point numbers

How do you multiply/divide one floating point number by another? I've been trying to do it using * and / for a while now, but I keep getting "expression must have integral or enum type" error.
you can multiply and divide just fine with * and /

The error you're getting sounds like you are trying to use a floating point as an index.

IE:

1
2
3
4
int myarray[10];
float whatever = 5;

myarray[whatever] = 5;  // this will error, can't use a float as an index 
Ah.......I wish I had figured this out 5 hours ago. Thank you!
just do anything with ( * && / ) c++ no restriction to it...just avoid automatic conversion.
Topic archived. No new replies allowed.