编译出现 '>' : ambiguous call to overloaded function求改正啊
相关代码如下:voidcompare(String&string1,String&string2){if(operator>(string1,string2)==1){s...
相关代码如下:
void compare(String &string1,String &string2)
{
if(operator>(string1,string2)==1)
{string1.display( );cout<<">";string2.display( );}
else
if(operator<(string1,string2)==1)
{string1.display( );cout<<"<";string2.display( );}
else
if(operator==(string1,string2)==1)
{string1.display( );cout<<"=";string2.display( );} 展开
void compare(String &string1,String &string2)
{
if(operator>(string1,string2)==1)
{string1.display( );cout<<">";string2.display( );}
else
if(operator<(string1,string2)==1)
{string1.display( );cout<<"<";string2.display( );}
else
if(operator==(string1,string2)==1)
{string1.display( );cout<<"=";string2.display( );} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询