Increment operator on pointer of array errors?
问题 I'm trying something very simple, well supposed to be simple but it somehow is messing with me... I am trying to understand the effect of ++ on arrays when treated as pointers and pointers when treated as arrays. So, int main() { int a[4] = { 1, 4, 7, 9 }; *a = 3; *(a+1) = 4; *++a = 4; //compiler error } 1: So at *(a+1)=4 we set a[1]=4; //Happy But when *++a = 4; , I'd expect pointer a to be incremented one since ++ is precedent to * and then * kicks in and we make it equal to 4. But this