The following code fragment:
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
char input[300], *p, *q[300], **r = q;
cin.getline(input, 300);
for (p = input; *p; p++)
switch (tolower(*p)) {
case 'e':
*r++ = p;
break;
case '.':
case '\'':
case ' ':
*p = '\0';
break; }
*r = 0;
for (r = q; *r; r++)
cout << *r << " ";
cout << endl;
}
was given as an example exam for my introduction programming course. What i don't understand is the use of the *p and *r as the middle argument in the for loops. I've only used inequalities for that location, so i have no idea what that means for pointers. Any help is appreciated.