Exponential Operator in C++
问题 I am taking a class in C++ and I noticed there are only a few math operators to use. I also noticed that C++ does not come with an exponential operator within its math library. Why must one always write a function for this? Is there a reason for the makers of C++ to omit this operator? 回答1: You don't write a function for this (unless you're insane, of course). There's a perfectly good pow function defined in the <cmath> header. Aside: if you try to use ^ as a power operator, as some people