From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shriramana Sharma Subject: const int f() and int f() const Date: Sun, 19 Mar 2006 20:48:08 +0530 Message-ID: <200603192048.08780.samjnaa@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline Sender: linux-c-programming-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: Linux C Programming List Suppose there is a function f() which returns an integer and does not change any value of the class it belongs to, should I declare it as: const int f(); or int f() const; What is the difference? Thank you. -- Tux #395953 resides at http://samvit.org playing with KDE 3.51 on SUSE Linux 10.0 $ date [] CCE +2006-03-19 W11-7 UTC+0530