const放在函数前和函数后

class c
{
   public:
       returnType functionName (parameter list) const;   //这个函数不会修改类成员
       
       const returnType functionName (parameter list);   //返回常量

  private:
     ...........
};

  

posted @ 2016-09-12 22:54  KennyRom  阅读(536)  评论(0编辑  收藏  举报