[Solved] istringstream to int8_t produce unexpected result

The problem is int8_t is implemented as char. The implementation of the input stream is working like this: char x; std::string inputString = “abc”; std::istringstream is(inputString); is >> x; std::cout << x; The result is ‘a’, because for char the input stream is read char for char. To solve the problem, provide a specialised implementation … Read more