I'm bored here's a decimal power-of-2 using simple carry-add. Don't expect your grader to believe you wrote it yourself though.
It can do 2^100000 in 15~20 seconds. I could use binary splitting and Karatsuba/FFT, but hey this is a forum post. Perhaps you'll understand it someday.
int p=10,*d=new int[p],s=1,b,i,j,c,*t;*d=1;
std::cout<<"Enter a number: ";
Anyway, there is a shortcut. The << operator isn't only for cout. On integers, it shifts bits. (It's called the left shift operator.) Imagine that the number 19 is written in binary: 10011. What the left shift does is, it shifts all the bits left and adds a zero in the empty slot. So you get 100110 for (19 << 1), 1001100 for (19 << 2) and so on. So (2^X) == (1 << X). Have fun.