How to convert a number in a char array to int using recursion? [closed]

  arrays, c++, char, string

I have a char array like this:

char str[] = "2828";

how can i convert it to an int number using recursion?
the function is:

int myArrayToInt(char *str, int n) {
}

example: char str[] ="2828", then n=4.

Source: Windows Questions C++

LEAVE A COMMENT