This may be a bit more C++ than Qt but I'm kind of rusty on the casts issues.
I want to write code that would handle large values and wanted to use uint64.
Qt Code:
int myIntVal; double myDoubleVal; quint64 myResult = myIntVal * myDoubleVal;To copy to clipboard, switch view to plain text mode
If the result of the multiplication in line 3 is out of the range of int/double would this code work or should I make some modification to assure the value will be correctly stored in the quint64 variable?
Bookmarks