Closed alexey-malov closed 9 years ago
В стандартной библиотеке C++, есть функции, stoi и ей подобные:
#include <string>
#include <iostream>
int _tmain(int /*argc*/, _TCHAR* /*argv*/[])
{
const char * s = "a";
try
{
int i = std::stoi(s);
}
catch (std::exception const& e)
{
std::cout << e.what() << "\n";
}
return 0;
}
50*0,9=45
принято
Не использовать exit