Читал, читал в нете. Все равно ерунда какая-то.
#include "iostream.h"
#include "string.h"
main()
{
using namespace std;
string test;
cin >> test;
}
Как сделать из test int?
если
atoi(test)
то
error: cannot convert `std::string' to `const char*' for argument `1' to `int atoi(const char*)'
если int(test), то из "1" 49 получается - ну, это понятно.
Как все таки нормально переделать?