// P226.CPP - Section 7.2.3, References to Pointers #include void FindNext( char * & p, char delim ) { while( *p && (*p != delim) ) p++; } int main() { char str[] = "abc,def,ghi,jkl"; for(char * p = str; *p; p++) { FindNext( p, ',' ); cout << p << endl; } return 0; }