Skip to main content

Thread: G++ How to use long long and uint64_t?


hello.

need write program, uses long numbers, 923372036854775807.

when it, error:

code:
#include <iostream> #include <inttypes.h>  int main() {     uint64_t var1;     long long var2;          var1 = 923372036854775807;        // 11     var2 = 923372036854775807;        // 12 }
g++

_.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

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'