just starting to learn C++, and sort of confusing about the following section of code:
int *getCharCountArray(char *str)
{
int *count = (int *)calloc(sizeof(int), NO_OF_CHARS);
int i;
for (i = 0; *(str+i); i++)
count[*(str+i)]++;
return count;
}
In specific, do not quite understand how the following two work?
for (i = 0; *(str+i); i++)
and
count[*(str+i)]++;