#include<iostream>
using namespace std;
class Base{
public:
void fun(const char *txt, char *cap)
{
cout<<"txt:"<<txt;
cout<<"cap:"<<cap<<endl;
}
void fun(const char *txt, unsigned int type)
{
cout<<"txt:"<<txt;
cout<<"cap:"<<cap<<endl;
}
};
void main 1
{
Base my;
my.fun("Good", 0);
}
  • 1、
【正确答案】 1、my.disp("good", 0)有误。    
【答案解析】 成员函数disp ---|||________|||---的重载将产生二义性。因为将调用成员函数my.disp("good", 0)时,系统无法确定第二个实参是空字符串NULL还是整数0。