Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sstream>
- #include <iostream>
- void convertStringToDouble(const std::string& line){
- std::cout<<line<<std::endl;
- std::stringstream dataLine(line);
- double val;
- if (line[0] != '#'){
- while(!dataLine.eof()){
- dataLine >> val;
- std::cout<<val<<std::endl;
- }
- }
- }
- int main(){
- std::string line = "2567.466952707705332 9376.302258934867496n";
- convertStringToDouble(line);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement