#include <iostream>
using namespace std; // So the program can see cout and endl
int main()
{
// The loop goes while x < 10, and x increases by one every loop
for ( int x = 0; x < 10; x++ ) {
// Keep in mind that the loop condition checks
// the conditional statement before it loops again.
// consequently, when x equals 10 the loop breaks.
// x is updated before the condition is checked.
cout<< x <<endl;
}
cin.get();
}
after i compile why it will show 0,1,2,..... 9 x++ doesnt mean oledi x = x + 1
therefore cout<<x<<endl should be 1,2.... correct me if i wrong.
thanks in advance.

dont understand forloop
MSDNMAN
It does not increase x until it has executed once.
x is 0 for the first cout.