類的函數聲明中「 const」最後的含義? - Meaning of 'const' last in a function declaration of a class?

問題:

What is the meaning of const in declarations like these? 像這樣的聲明中const的含義是什麼? The const confuses me. const使我感到困惑。 函數

class foobar
{
  public:
     operator int () const;
     const char* foo() const;
};

解決方案:

參考一: https://stackoom.com/question/39Xt/類的函數聲明中-const-最後的含義
參考二: https://oldbug.net/q/39Xt/Meaning-of-const-last-in-a-function-declaration-of-a-class
相關文章
相關標籤/搜索