Although I do not catch what did you mean, may I ask the following question to clarify the pointer issue?
Code:
void main() {
char *pw="west", *pe="east", *ps="South", *pn="North";
enum location {east=1, west=2, South=3, North=4};
enum location direction;
direction = west;
if(direction == west)
printf("Cannot go %s\n", pw);
}
Why the pw needs to add the prefix of '*'? Is it because pw points to a string object?
If I printf("Cannot go %s\n", &pw), it returns 'D'. Why does it return 'D'?
Thanks a lot