Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <sstream>
  2. #include <iostream>
  3.  
  4. void convertStringToDouble(const std::string& line){
  5. std::cout<<line<<std::endl;
  6. std::stringstream dataLine(line);
  7. double val;
  8. if (line[0] != '#'){
  9. while(!dataLine.eof()){
  10. dataLine >> val;
  11. std::cout<<val<<std::endl;
  12. }
  13. }
  14. }
  15.  
  16.  
  17. int main(){
  18. std::string line = "2567.466952707705332 9376.302258934867496n";
  19. convertStringToDouble(line);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement