home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!not-for-mail
- From: ren@miles.mps.ohio-state.edu (Liming Ren)
- Newsgroups: comp.lang.c++
- Subject: A question about "const".
- Date: 14 Sep 1992 22:18:53 -0400
- Organization: Department of Mathematics, The Ohio State University
- Lines: 15
- Distribution: usa
- Message-ID: <193h6dINN2of@miles.mps.ohio-state.edu>
- NNTP-Posting-Host: miles.mps.ohio-state.edu
-
-
-
- Could somebody tell me what the role of const is in the following code?
- I am new to C++.
-
-
- class String{
- public:
- int length() const {return len;} //The const in between ) and {
- //...
- private:
- int len;
- char *str;
-
- }
-