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

Valutazione Template - Joomla! Forum - community, help and support

SD Datastring Convention

First use of Arduino Uno : avrdude error on Blink uploading