在類的聲明中經常會見到函數的後邊跟一個const,這是幹什麼的呢?
const定義的函數,不能對其數據成員進行修改。而const的對象,不能對非const對象進行引用。
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"typ
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragr
{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null