I am looking at the following line of code
++ptr_it->refcount;
where ptr_it
is an iterator for a list of a particular class where refcount
is an integer member variable. I can't figure out whether the ++
operator here is being used to go to the next element of the list in the ptr_it
or if it is being used to increment the refcount
variable. Or maybe both? I figure that refcount
must be affected in some way otherwise I'm not sure why it is dereferenced here. Can anyone tell me what is actually happening here.