Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cornell!rochester!kodak!atexnet!walsh From: walsh@dude.epps.kodak.com (Joe Walsh) Newsgroups: comp.lang.c++ Subject: const Message-ID: <5027@atexnet.UUCP> Date: 24 Aug 90 19:04:02 GMT Sender: news@atexnet.UUCP Distribution: world Organization: EPPS (A Kodak Company), Billerica, MA Lines: 19 I have a question about the use of const in member functions. It seems to me taht there are three different uses for const in member functions. They are: 1) constant arguments to the function A::f(const x) 2) constant return type from the function const char* A::g() 3) constant function where the object or 'this' is a constant. The second and third types seems to confuse me. Are there really two distinct types, and what is the syntax. I have seen int A::f() const; in some code as well as int const A::f(); and I am not sure if there is a diference. The former syntax does not seem to be accepted by g++. any help would be appreciated, thanks -- Joe Walsh Atex Publishing Systems 165 Lexington Road, 400/165L Billerica MA 01821 Internet: Usenet: Voice: 508-670-4022 Fax: 508-670-4033