Ulrich Eckhardt wrote: > Paulo Matos wrote: > > I'd like to have access to 64 bits. I think unsigned long long is 64 > > bits in g++ although I'm not sure. Is there a way to know which type is > > 64 bits long or not? > > #include <stdint.h> and use uint64_t. On systems that lack that header, > <inttypes.h> might provide some replacement. In any case work with a > typedef that shows that you want 64 bits. >
Thanks for the tip! :) > > Still, even if I know that unsigned long long is 64 bits long, how can > > I know that it will occupy only two registers in a 32bit PC, or 1 > > register in a 64bit PC? Is there a way to make sure a 64 bit value, be > > it an unsigned long long or a unsigned char v[8] to be kept on 2 > > registers or 1 in 32 bit or 64 bit PC respectively? > > Generally, you can't know that portably in C++. Why do you think you need > to? > I don't need to... I just would like to know that... curiosity. Still, I know it is not possibly in portable C++ but that's why I posted here. Any g++ specific way? Thanks, Paulo Matos > Uli > > -- > http://gcc.gnu.org/faq.html > http://parashift.com/c++-faq-lite/ _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus