In C, you're allowed to jump past the initialisation of a variable, and it will remain uninitialised, giving a garbage value (or perhaps other undefined behaviour).
In C++, you're not allowed to jump past the initialisation of a variable. That's because variables in C++ are, in general, more complicated beasts with constructors and destructors. Leaving them uninitialised could leave them in a state where the can't safely be destroyed, making the program go wrong in all manner of ways when they need to be destroyed; and so, instead, the language requires that they are correctly initialised.
At least on my compiler, the error message makes this quite clear:
test.cpp: In function ‘int main()’:
test.cpp:17:1: error: jump to label ‘b’ [-fpermissive]
test.cpp:13:6: error: from here [-fpermissive]
test.cpp:15:5: error: crosses initialisation of ‘int b’
explaining that it's an error to jump past the initialisation of the variable.