In C++ the rule of thumb is to declare variables with as minimal scope as required. If "i" is to be used only by the for() loop and the code inside it, then it is quite right to declare it there.
You don't need brackets either if you only have one statement in the for loop.
Heck, you could even do this: for (int i = 0; i < x; cout << i++ << '\n');
You can write virtually any function as a single expression but that is not necessarily good.
Having the output in the body and the increment in the increment part of the for is much more readable.
Two questions:
Why does post-increment take an int? Where does that int come from?
Why isn't it defined to be the same as pre-increment except called after the end of the statement?