Could it be something to do with the sizes of integers between Java & C++?