Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on C++ function with const pointer parameter

$
0
0
Generally spoken, declarations mimic usage -- const Node *p declares something that can be changed (it is not const) and, when dereferenced (*p), yields a type const Node. By contrast, Node * const p is something const (p itself!) which cannot be changed and, when dereferenced, yields a value of a plain Node which can very well be changed.

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>