小编

关注

ambiguous call to overloaded function

小编

关注

阅读 91

2022-07-27


出错代码:

fun(int
{

}


fun(float
{

}


void CTest22Dlg::OnButton1()

{

fun(3.0);

}

错误信息:


error C2668: 'fun' : ambiguous call to overloaded function


问题分析:

编绎系统不知道将3.0转化成浮点形还是整型。

解决方法:

void CTest22Dlg::OnButton1() 

{

fun((float)3.0);

}

相关推荐

code_balance

Scala中使用JSON.toJSONString报错:ambiguous reference to overloaded definition

code_balance 57 0 0

乐百川

13.10 Scala中使用JSON.toJSONString报错:ambiguous reference to overloaded definition

乐百川 84 0 0

汤姆torn

CALL function IN BACKGROUND TASK

汤姆torn 116 0 0

查拉图斯特拉你和他

Call to a member function fetch() on null

查拉图斯特拉你和他 113 0 0

无愠色

Incorrect parameters in the call to native function 'concat'

无愠色 112 0 0

林肯公园_97cc

thinkphp报错Call to a member function assign() on null

林肯公园_97cc 130 0 0

爱薇Ivy趣闻

JS:Function对象call、apply、bind改变this指向

爱薇Ivy趣闻 109 0 0

静守幸福

解决:Function call can be replaced with set litera问题

静守幸福 130 0 0

生活记录馆

Fatal error: Call to undefined function mysql_connect()

生活记录馆 155 0 0

祈澈菇凉

Thinkphp5遇到Call to a member function toArray() on null

祈澈菇凉 70 0 0

精彩评论(0)

0 0 举报