Solution Of int AscToInt(const char* num)
int AscToInt(const char *num){
int intNum = 0;
int curDigit = 0;
int minus = 1;
if(*num == '-')
{
minus = -1;
num++;
}
int len = strlen(num) - 1;
for(int i = 0;i<=len;i++)
{
curDigit = *num - 48; // "456" -> 4
intNum += curDigit * pow(10, (double)(len - i));
num++;
}
intNum *= minus;
return intNum;
}