My c++ code
string map = "111111111111111111111111111"
for (int i = 0; i < 20; i++)
{
int number = atoi(map[i]);
}
Gave me error: cannot convert parameter 1 from 'char' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
string map = "111111111111111111111111111"
for (int i = 0; i < 20; i++)
{
std::istringstream ss(map[i]);
}
Gave me some error too.
How should I do that?