What is the C++ function to raise a number to a power? October 24, 2022 by Tarik pow() in the cmath library. More info here. Don’t forget to put #include<cmath> at the top of the file.