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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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