I was reading some code and came across this thing. I don’t have the whole context now save this line.
cout<<(*--*++ptr+1)<< endl;
this compiles fine and works when we input values in it..
its declaration is like this.
char ***ptr ;
What is this operator and is it included in the standard?
It’s not a single operator, it’s a combination of several unary operators. It gets parsed like this:
So,
ptr1is first incremented, then dereferenced, then that value is decremented and dereferenced again.