Click here to Skip to main content
16,021,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Character set Pin
trønderen14-Sep-24 6:48
trønderen14-Sep-24 6:48 
GeneralRe: Character set Pin
Calin Negru14-Sep-24 9:18
Calin Negru14-Sep-24 9:18 
GeneralRe: Character set Pin
k505414-Sep-24 10:15
mvek505414-Sep-24 10:15 
GeneralRe: Character set Pin
markkuk14-Sep-24 11:15
markkuk14-Sep-24 11:15 
QuestionREMOVED Pin
jana_hus7-Sep-24 7:12
jana_hus7-Sep-24 7:12 
AnswerRe: Addendum how to build real time events in Qt? Pin
Richard MacCutchan7-Sep-24 21:29
mveRichard MacCutchan7-Sep-24 21:29 
QuestionLooking for opinions on currency handling.... Pin
Jeremy Falcon2-Sep-24 8:20
professionalJeremy Falcon2-Sep-24 8:20 
GeneralRe: Looking for opinions on currency handling.... Pin
k50542-Sep-24 11:16
mvek50542-Sep-24 11:16 
If you're not concerned about speed, then the decimal::decimal[32/64/128] numerical types might be of interest. You'd need to do some research on them, though. It's not clear how you go about printing them, for example. Latest Fedora rawhide still chokes on
C++
#include <iostream>
#include <decimal/decimal>
int main()
{
    std::decimal::decimal32 x = 1;
    std::cout << x << '\n';
}
where the compiler produces a shed load of errors at std::cout << x , so the usefulness is doubtful. An alternative might be an arbitrary precision library like gmp

A quick test of a loop adding 1,000,000 random numbers showed very little difference between unsigned long and __uint128_t For unsigned long the loop took 0.0022 seconds, and for __int128_t it took 0.0026 seconds. Slower, but not enough to not consider them as a viable data type. But as with the decimal::decimal types, you would probably have to convert to long long for anything other than basic math.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon2-Sep-24 11:35
professionalJeremy Falcon2-Sep-24 11:35 
GeneralRe: Looking for opinions on currency handling.... Pin
Richard Andrew x642-Sep-24 13:49
professionalRichard Andrew x642-Sep-24 13:49 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon2-Sep-24 13:56
professionalJeremy Falcon2-Sep-24 13:56 
GeneralRe: Looking for opinions on currency handling.... Pin
Richard Andrew x642-Sep-24 14:26
professionalRichard Andrew x642-Sep-24 14:26 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon2-Sep-24 15:33
professionalJeremy Falcon2-Sep-24 15:33 
AnswerRe: Looking for opinions on currency handling.... Pin
CPallini2-Sep-24 20:05
mveCPallini2-Sep-24 20:05 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon3-Sep-24 2:48
professionalJeremy Falcon3-Sep-24 2:48 
GeneralRe: Looking for opinions on currency handling.... Pin
CPallini3-Sep-24 3:07
mveCPallini3-Sep-24 3:07 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon3-Sep-24 3:23
professionalJeremy Falcon3-Sep-24 3:23 
GeneralRe: Looking for opinions on currency handling.... Pin
Mircea Neacsu3-Sep-24 15:45
Mircea Neacsu3-Sep-24 15:45 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon3-Sep-24 15:50
professionalJeremy Falcon3-Sep-24 15:50 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon3-Sep-24 15:53
professionalJeremy Falcon3-Sep-24 15:53 
GeneralRe: Looking for opinions on currency handling.... Pin
Mircea Neacsu3-Sep-24 16:07
Mircea Neacsu3-Sep-24 16:07 
GeneralRe: Looking for opinions on currency handling.... Pin
Jeremy Falcon3-Sep-24 17:31
professionalJeremy Falcon3-Sep-24 17:31 
QuestionADDENDUM How to display full 4 binary bits - after QString "number" option converts string to int. including hexadecimal strings. Pin
jana_hus30-Aug-24 7:39
jana_hus30-Aug-24 7:39 
QuestionRe: How to display full 4 binary bits - after QString "number" option converts string to int. Pin
Richard MacCutchan30-Aug-24 8:05
mveRichard MacCutchan30-Aug-24 8:05 
AnswerRe: REOPEN How to display full 4 binary bits - after QString "number" option converts string to int. including hexadecimal strings. Pin
Richard MacCutchan3-Sep-24 21:56
mveRichard MacCutchan3-Sep-24 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.