Possible infinite loop?

I'm having trouble figuring out why this program runs what I think is an infinite loop. Specifically, I'm trying to use a while loop to raise a user defined number to a user defined power. The dilemma is that it never ends up printing.

// This program uses a loop to raise a number to a power.

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
int num, bigNum, power, count;

cout << "Enter an integer: ";
cin >> num;
cout << "What power do you want it raised to? ";
cin >> power;
bigNum = num;
count = 1;
while (count <= power);
bigNum *= num;
cout << "The result is " << bigNum << endl;
return 0;
It's been a while for C++ and coding but... Remove the semicolon after your while condition?
get rid of the semi colon after the while conditions.
That was it! Thank you both. *sigh* for simple syntax errors.
Topic archived. No new replies allowed.