help please!!

what is wrong with this statement

int loopy = 1;

do

cout << "Body of Loop.";

loopy++;

while (loopy = 1);
What do you think is wrong with it?
You forgot the curly braces. Also in the while condition I gues you wanted to compare loopy with 1 (?), but the comparison operator is ==.
This should work:
1
2
3
4
5
6
  int loopy = 1;
  do
  {
    cout << "Body of Loop.";
    loopy++;
  } while (loopy == 1);


Topic archived. No new replies allowed.