小编Sil*_*rut的帖子

当我尝试编译程序时,我遇到了一堆错误,例如:'std :: max':找不到匹配的重载函数

当我尝试编译程序时,我得到了一堆错误,如:

'std::max': no matching overloaded function found

 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr) noexcept(<expr>)': expects 3 arguments - 2 provided


 C2782: 'const _Ty &std::max(const _Ty &,const _Ty &) noexcept(<expr>)': template parameter '_Ty' is ambiguous


  C2784: 'const _Ty &std::max(const _Ty &,const _Ty &) noexcept(<expr>)': could not deduce template argument for 'const _Ty &' from 'int'
Run Code Online (Sandbox Code Playgroud)

以下是导致大多数问题的代码:

 template <typename TVar>
    void CopyVar( void*& pTarget, const void*& pSource, int nAlign = 4 )
    {
        *((TVar*) pTarget) = *((TVar*) pSource);
        ((BYTE*&) pTarget) += …
Run Code Online (Sandbox Code Playgroud)

c++ compiler-errors

2
推荐指数
1
解决办法
71
查看次数

标签 统计

c++ ×1

compiler-errors ×1