Hello,

I am playing around with big numbers in g++. The following code works
perfectly (on an AMD64):

#include <iostream>

int main ( int argc, char** argv )
{
  long int c = 1000000000000000000; // 1,000,000,000,000,000,000
  __int128_t d = 1000000000000000000; // 1,000,000,000,000,000,000

  std::cout << sizeof(c) << " " << sizeof(d) << std::endl;

  return 0;
}

That is, the output of this small programm is "8 16". But as soon as I
expand the 128bit integer, I end up with a warning telling me that the
integer is to large for its type.  What kind of suffix (something like
'LLU') do I have to add to mark the right hand side of the assignment
as 128bit integer? Is there a standard way to print such integers?

Best regards,
Kay
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to