the post increment operater will be executed first -> first the pointer is incremented pointing to the next int in memory and that is dereferencedCode:for(int i =0; i<10; i++) { cout <<a<<"\n"; *b++; //shouldn't this assigned a new value to a?? }
you want (*b)++
Kurt