Em 10/10/2012 10:09, Anthony Toft escreveu: > But why? (the bane of my parent's existence) > > p++; only increments the value of the pointer on the stack, not the=20 > original pointer (&myInt or &anotherInt) nor the contents of the=20 > pointer. > > Here at work (I am 18 years into a software engineering career) I see=20 > examples of unnecessary const-ness all over the place, it causes any=20 > amount of trouble! The only time I have ever needed a is=20 > because of overzealous use of const parameters, the compiler will not=20 > remove const-ness without express permission, unlike adding it. > > Now, on the other hand, pointers to const objects or values ie "const=20 > int *p" I feel is an excellent idea, but once again, it's not the=20 > calling function saying "I won't allow him to change this" it's the=20 > called function saying "I promise I won't change it" Useful to prevent the callee function from using the pointer as a pointer to an array when it points to a single element. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .