#include "stdafx.h"
class cls
{
public:
 int front( int a) const
  {
   return 20;
  }
 int front(int a)             
 {
  return 10;
 }
protected:
private:
};
int _tmain(int argc, _TCHAR* argv[])
{
 /*const */cls b;
 b.front(1);
 
 return 0;
}
实例b没有const修饰时:
如果有front() const和front()函数  运行时进入front()
如果只有front()                             运行时进入front()
如果只有front() const                    运行时进入front() const
实例b有const修饰时:
如果有front() const和front()函数  运行时进入front() const
小弟C++语法不熟悉 谁能解释下