maybe you mean this
stoi or atoi. First is for string type of c++, second is for C-string.
string anint = "123";
int val = stoi(anint);
but your question is confusing because of the array part. what is in the string, and what is supposed to be in the array? This could require you to parse the string yourself -- which basically means take the numeric substrings out and do the above to each one.