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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -