fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. std::string number = 12345.123456789;¨
  7.  
  8. std::cout << atof(number.c_str()) << endl;
  9. }
  10.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:40: error: stray ‘\302’ in program
   std::string number = 12345.123456789;¨
                                        ^
prog.cpp:6:41: error: stray ‘\250’ in program
   std::string number = 12345.123456789;¨
                                         ^
prog.cpp: In function ‘int main()’:
prog.cpp:6:24: error: conversion from ‘double’ to non-scalar type ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’ requested
   std::string number = 12345.123456789;¨
                        ^~~~~~~~~~~~~~~
stdout
Standard output is empty