c++ - Ambiguous call to overloaded function (with a variable argument list) -
i have following code:
class foo { public: bool getbar(char** ptr); private: bool getbar(char** ptr, ...); }; foo* afoo = ...; char* aptr = ...; bool res = afoo->getbar(&aptr);//error c2668
which generates following error:
error c2668: 'foo::getbar' : ambiguous call overloaded function foo.h: 'bool foo::getbar(char **,...)' foo.h: or 'bool foo::getbar(char **)' while trying match argument list '(char **)'
is there way fix error without renaming 1 of getbar functions?
(visual studio 2005)
Comments
Post a Comment