Neither init nor pageSize is 0.
Nor is %d suitable format string specifier for a 64-bit value, I would put :-)
Most likely you will need to use %ld (if your long bits are 64 bits) or %lld (if your long long bits are 64 bits) or fixed-width specifier macros from the latest C standard, which I cannot remember head to head assuming they are available in your environment :-)
This whole problem is likely to disappear if you turn on C ++, and not the half on which many coders seem to exist (using outdated things like stdio.h when better alternatives are available). You should use type:
std::cout << a << ' ' << b << '\n';
It also helps to have a compiler that is a bit intelligent, and make sure you use this intelligence:
pax$ cat qq.cpp
For those who are really interested in mechanics as to why the values ββof the values ββchange depending on their order in printf , see this answer .
It goes into detail about what things (and more importantly, the sizes of these things) get on the stack, comparing them to what you told printf .
In short, you lied to printf to treat you like your significant other if you were caught lying to them :-)
source share