Pointer Arithmetic
It is legal to perform arithmetic on pointers.
char * text = " ... some text "; // p++ advances pointer to next location for (char * p = text; *p != '\0'; p++) if (isVowel(*p)) cout << "vowel value is " << *p << "\n";
Previous slide
Next slide
Back to first slide
View graphic version