64 bit integers

is there any data type that is 64-bits wide (for ints) and can be used with g++?

1 Like

You can use long long. If you are using scanf/printf instead of cin/cout you need to use the specifier %lld. http://en.cppreference.com/w/cpp/language/types

1 Like

Thanks, I didn’t know there is standard for this, when I was reading some C/C++ book, there was always just that it’s guaranteed that sizeof(int) <= sizeof(long) and so on (similar to the note on that page)…

Is there standard defined somewhere in FAQ?