我是靠谱客的博主 明亮音响,这篇文章主要介绍Delphi XE E2251 Ambiguous overloaded call to ‘StrPas‘错误处理,现在分享给大家,希望可以做个参考。

delphi7中的语句:

 if  pos('Form111',strpas(@szText))<>0 then

在delphi xe中编译出错:

[DCC Error] Unit1.pas(84): E2251 Ambiguous overloaded call to 'StrPas'
  SysUtils.pas(8723): Related method: function StrPas(const PAnsiChar): AnsiString;
  SysUtils.pas(8728): Related method: function StrPas(const PWideChar): string;

在XE里可以这样用:

 if  pos('Form111', PChar(@szText))<>0 then

最后

以上就是明亮音响最近收集整理的关于Delphi XE E2251 Ambiguous overloaded call to ‘StrPas‘错误处理的全部内容,更多相关Delphi内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部