fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. int main()
  5. {
  6. double d;
  7. std::string s("0.735");
  8. std::istringstream is(s);
  9. is >> d;
  10.  
  11. std::cout << d << '\n' << is.str() << '\n'
  12. << is.str().empty() << '\n' << is.eof() << '\n';
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
0.735
0.735
0
1