fork download
  1. #include <string>
  2. #include <iostream>
  3. using namespace std::literals;
  4.  
  5. int main()
  6. {
  7. std::cout << std::stoul("220V"s) << std::endl;
  8. std::cout << std::stof("1.50A"s) << std::endl;
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
220
1.5