there is a line in the memory of the form "90 14 55 af 9b ... etc." how to set the read flags from the string of 16 values correctly?
#include <iostream> #include <sstream> std::istringstream ss ("10 03 02 01 ff 01 00 00 d8 03 02 01 "); int main() { int x = -1; //ss.setf(std::ios::hex); спотыкается на "ff", не читает в дальнейшем в 16-ном режиме, такое ощущение, что флаг не устанавливается //ss>>std::hex; в данном случае всё отлично работает while (ss >> x) { std::cout<<x<<" "; } return 0; }
"10 03 02 01 ff 01 00 00 d8 03 02 01 "? The character of each byte? Or like this\x10 \x03 \x02 \x01 \xff \x01 \x00 \x00 \xd8 \x03 \x02 \x01"? - Duracellsetfuse, but notss >> std::hex;- borat_brata