I suggest you find yourself a C/C++ tutorial and search for pointer to char or similar. Using char *str suggests to me that you are using C rather than C++. C doesn't really have a String type, rather using arrays of chars 1 larger than the number of letters in the text. The extra char is set to \0 = the null character.
I don't think that is a very good way to calculate hash codes nor a very good way to demonstrate pointers.
I think the reason you didn't find anything on the web is that search engines don't search the asterisk.
I love a woman who dresses in stainless steel ... and carries tiny ads:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth