What is wrong with this code

Note that long is same as int in C++ (all the new versions).