I need some variable/struct to store 32hex number or 128-bit number in an STL container. Do you have any suggestion for me ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot perform arithmetic on 128 bit data without some big integer library (or non-standard SSE extensions I don’t know much about anyway).
If you just need to store it use a
std::pair<uint64_t, uint64_t>or a struct:If you need bitwise operations use
std::bit_vector.If you need arithmetic you have to use a big integer library like GMP.