Never assume because it comes out of a book its correct...doesn't help us when we're studying tho, right? Anyways....
First, you have to define the values for your variables before you do an output statement so you need to move the values for u and v BEFORE the cout statement that calls the variables otherwise it appears undefined.
Second, the first cout statement uses two values that are undefined. The way they are without any decimal point says to the compiler that you are using 2 integers. According to the POW function library, here are your options (copied and pasted here from the following link
http://en.allexperts.com/q/C-1040/fu...gar-string.htm) :
C++ (taken from book "The C++ Standard"):
double pow(double x, double y);
double pow(double x, int y);
float pow(float x, float y);
float pow(float x, int y);
long double pow(long double x, long double y);
long double pow(long double x, int y);
One of the numbers MUST be a floating point number. You can define it in a case like yours one of two ways (that I have discovered so far)
a) change one of your undeclared numbers to have a decimal point in it eg. pow(1.0, 2)
b) put double in the function eg. pow(double(2), 6)
Both seem to resolve the issue for me.
BTW, our class was to find out if pow would accept an integer or only double in the function. That's how I ended up finding out the rules for the pow library.
Hope it helps.