Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <regex>
- using namespace std;
- int main()
- {
- string fv;
- regex e ("[,]",std::regex_constants::icase);
- cout << "Indtast something, something: ";
- getline (cin, fv);
- cout << "Mangeling ...\n\n";
- fv = regex_replace(fv, e, ".");
- float a = atof(fv.c_str());
- cout << "Result:" << a;
- cout << "\n\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement