^ is not the exponentiation operator, it is the bitwise XOR operator. There is, in fact, no exponentiation operator. There is a pow function in math.h for dealing with doubles. For integers, for powers of 2, you can use << to shift left. For other integers... you have to do it yourself.

-Lee

EDIT: For simple, fixed powers, just multiply the appropriate number of times.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.