how to take input for uint32_t variable
i have declared a variable as uint32_t num; when i take input for this variable i.e cin>>num; cout<
when i run this program, i gives num value as 12345678, it works fine & give cout. but when i give input as 1234a开发者_C百科bcd. it creates problem & displays only 1234. please suggest solution to resolve this problem.
Use std:: cin >> std::hex >> num;
if you want to read hex numbers.
精彩评论