how to change a variable's value in a const function# Programming - 葵花宝典
j*g
1 楼
An interview question.
First he asked what is a const function. I said it's a function that doesn't
change a variable's value.
Then he asked what if you want to change that value in the const function? I
said use mutable. He told me there's other way.
Any idea what is the other way??
First he asked what is a const function. I said it's a function that doesn't
change a variable's value.
Then he asked what if you want to change that value in the const function? I
said use mutable. He told me there's other way.
Any idea what is the other way?