Originally posted by: BingBongWongFooey
Yep, long long is guaranteed to be at least 64 bits, however you need to make sure and compile your code as c99, not c89/90.
Originally posted by: Chaotic42
Originally posted by: BingBongWongFooey
Yep, long long is guaranteed to be at least 64 bits, however you need to make sure and compile your code as c99, not c89/90.
How do I do that?
Originally posted by: Chaotic42
Ok, I included stdint.h, compiled with -lm and -std=gnu99, changed the variable type from unsigned long long int to uint_64t, and it still doesn't like numbers larger than 2^31-1.
Here's the top part of the code:
Originally posted by: AgentEL
Originally posted by: Chaotic42
Ok, I included stdint.h, compiled with -lm and -std=gnu99, changed the variable type from unsigned long long int to uint_64t, and it still doesn't like numbers larger than 2^31-1.
Here's the top part of the code:
What do you mean, "it still doesn't like"? Compiler error? Run-time error?
gcc has data type "long long" for 64-bit integers, "%lld" is the conversion specifier for scanf/printf functions