call of overloaded 'min(int&, int&)' is ambiguous

前端 未结 5 538
梦如初夏
梦如初夏 2020-12-11 06:34

I got some problem on template.This code passed under vc6 but failed under g++. Is there anybody could tell me the reason? thanks.

#include
u         


        
5条回答
  •  我在风中等你
    2020-12-11 07:09

    instead of writing std::cout, u may use the namespace std, and create your function min in another namespace, say abc... so now when u call your function min, just write abc::min.. this should solve your problem.

提交回复
热议问题