Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   "const" in object (http://www.programmingforums.org/showthread.php?t=15782)

JD-Salinger May 5th, 2008 9:58 PM

"const" in object
 
I realized i am having a hard time understanding what "const" means, to generalize what i Know, it means that using "const" means ull never change the value
for example

const int maxlen=30;

that simply means that maxlen cant be altered.(correct me if i am wrong)
but as i read more examples in the book and as i try the examples in the code and compiling it(there are some typos when i compile), there are errors in the const and i realize that most of it is when using const in a object

like

List const & list = _htab.Find (str, len);
or
const List x

etc.

DO you know any online tutorials out there that would make it clear to me?... thank you for your understanding

Ancient Dragon May 5th, 2008 11:54 PM

Re: "const" in object
 
tutorial here.


All times are GMT -5. The time now is 2:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC