void showPair();改成 void showPair()const;
在具有 如上图所示的函数中,如果调用了其它函数,那么其它函数也必须有 const 属性,否则就会出现 类型限定符不兼容的错误!