May I know why's the reason that when I declare a pointer array like
char *suits[]={"abc","cab","bca"}
there is no error even I am assigning a string instead of the address to pointer? Because from what I have learnt, the pointer can only be assigned by address(&) or another pointer(*). Even more puzzling part is when I print out the pointer array
cout<<suits[1];
I got the string "cab", instead of the address even I do not use the dereference operator. And when I use the dereference operator
cout<<*suits[1];
I got 'c' only.
To sum up the questions are 1)why I can assign a string to char type pointer instead of an address or pointer, and 2) why when I print out the char type pointer, instead of giving me the address, it shows out the string. 3)Finally,why is that when I dereference the char type pointer, it give me the value of the first char in the string.
Really wanna know why char type pointer is so different from others?