I know how to obtain the square root of a number using the sqrt function.
sqrt
How can I obtain the cube root of a number?
include std::pow(n, 1./3.)
Also, in C++11 there is cbrt in the same header.
cbrt
Math for Dummies.