Recent Changes - Search:

Main.SideBar (edit)

PmWiki

LongOrUnsignedLong

Sometimes we want to print a pointer as a number, such as this:

  QString string("%1").arg((unsigned int)pointer, 16);

which creates a a HEX string from the pointer. However for AMD64 pointers have 64 bit, while uint has 32 only. So we must use long instead of int.

The question is: should we replace the "unsigned int" in the code above by "long int" or by "unsigned long int" ? Anyone has a deeper knowledge on this?

Currently we use unsigned long int. If this is wrong, it must be fixed in:

  • boufodebugwidget.cpp
Edit - History - Print - Recent Changes - Search
Page last modified on December 13, 2005, at 19:46