const int f() and int f() const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux