which property of a constant makes it not changable?

后端 未结 3 2068
闹比i
闹比i 2021-01-03 01:39

Today I faced an interview in which one question was very tricky for me. Interviewer said \"how to make constant able to change its value?\"

I replied \"using point

3条回答
  •  误落风尘
    2021-01-03 02:29

    I would think that the interviewer was expecting you to say const_cast<>() which can make a constant declared variable changeable in code.

提交回复
热议问题