Exponential Operator in C++ -
i taking class in c++ , noticed there few math operators use. noticed c++ not come exponential operator within math library.
why must 1 write function this? there reason makers of c++ omit operator?
you don't write function (unless you're insane, of course). there's perfectly pow
function defined in <cmath>
header.
aside: if try use
^
power operator, people wont do, you'll in nasty surprise. it's exclusive-or (xor) operator (see here).
Comments
Post a Comment