I have a reg file which I’m trying to read.
There’s a type “dword” in some of the values…
"check"=dword:000001f4
"blah"=dword:000000c8
"test"=dword:00000000
"hello"=dword:00000000
What C++ type should I convert it to ? and how ?
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.
A
dwordis a double word, where a word is the old (Intel 8086) 16-bit word.So, it converts to the WinAPI-specific type
DWORD, or the standard C (but not yet standard C++) typeuint32_t. Anunsigned longis guaranteed by C++03 to be large enough to hold 32-bits values as well, but may be wasteful on 64-bit platforms. Anunsigned intwill be large enough on MSVC++.Conversion (if you have a hex string) can be done using
strtoul.