|
-
November 4th, 2009, 01:01 PM
#1
Question regarding "const"
Ok this may be a stupid questions however, the book I am studying from says that following the principles of least privilege you should always declare a variable (arrays and such) const if the function is not going to manipulate the data. IE: just printing out and array or something similar. My question is what difference does it make weather I do or not. If I don't code the function to change the value then why is const so important and stressed so much as good eng practice. Thanks in advance for your replies.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|