I have some confusions in my codes regarding std:: functions.
cout<<tmp;
cout<<std::hex<<setw(4)<<tmp;
tmp is an int variable. After setting tmp to hex type, when I print tmp again, it is not converted back to decimal type (In face I have to include std::dec). Can anyone explain for me what happened behind-the-scene?
Thanks in advance