SyntaxFix
Write A Post
Hire A Developer
Questions
To assign, you should use p=p+1; instead of p+1=p;
p=p+1;
p+1=p;
int main() { int x[3]={4,5,6}; int *p=x; p=p+1; /*You just needed to switch the terms around*/ cout<<p<<endl; getch(); }