Thread: G++ How to use long long and uint64_t?
hello.
need write program, uses long numbers, 923372036854775807.
when it, error:
g++code:#include <iostream> #include <inttypes.h> int main() { uint64_t var1; long long var2; var1 = 923372036854775807; // 11 var2 = 923372036854775807; // 12 }
_.cpp:11: error: integer constant large ‘long’ type
_.cpp:12: error: integer constant large ‘long’ type
is there way can work such numbers?
nb! numbers must integer, no double, no float, no other types.
put ll or llu behind:
var1 = 923372036854775807llu;
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk G++ How to use long long and uint64_t?
Ubuntu
Comments
Post a Comment