My while loop doesn't stop, why?

A friend of mine tested this code and it works properly and also stops when it should. I'm using codeblocks with mingw. Could it be my compiler or does anyone know what is happening?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

using namespace std;

int main()
{
    int variable = 0;

    while (variable < 5000)
    {
        variable++ ;
        cout << variable << endl ;
    }
return 0;
}


http://i.imgur.com/mW8IAmL.jpg
It has to be your compiler. Even the C++ shell on this website has it be completely functional. Try building it again.
Oh, rebuilding it worked.
Topic archived. No new replies allowed.