Location of the keyword 'const' and its meaning

Hello,

I am having a trouble recognizing the meaning of the keyword const
depending on its location.
There are three const in the following code.
Can anyone help on clarifying meaning of each const in this case?

Thank you.

1
2
3
const void setInt const(const int k){
x = k;
}
mistake cannot return a const and be void(no return value)

second const ghost after () to means this member method is not modifying any member attribute , the third const means a constant integer value.
This might be of help in determining which const means what and where

http://duramecho.com/ComputerInformation/WhyHowCppConst.html
Topic archived. No new replies allowed.