i got a problem with exponentiation(< i think its called that in english XD)
gives me this error in visual c++:Code:int b = 1; int a() { return 600 ^ ((double)b / 100 + 1); }
Code:expression must have integral or enum type
i got a problem with exponentiation(< i think its called that in english XD)
gives me this error in visual c++:Code:int b = 1; int a() { return 600 ^ ((double)b / 100 + 1); }
Code:expression must have integral or enum type
That is because ^ is the bitwise excluside or operator, not exponentiation.
You could #include <cmath> and use std::pow instead.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thanks it works now =D