I find it the opposite, when I read code that doesn't use const at all. In that case you want to make sure that
code doesn't change either the value the pointer is pointing to and where the pointer is pointing to :)
<pre>
#include <stdio.h> void function ( int const * const value ) { printf ("%d\n", * value); / * more code * / ( * value)++; / * more code * / ++value; }
int main(int argc, char * * argv) { int value = 1; int * pvalue = &value; function(pvalue); return 0; }
$ gcc t1.c t1.c: In function ‘function’: t1.c:5: error: increment of read-only location ‘* value’ t1.c:7: error: increment of read-only location ‘value’ </pre>
quick googling: http://www.cprogramming.com/tutorial/const_correctness.html
EDIT: how can we properly paste code in here? The * mess things up.