Блог пользователя parveen1981

Автор parveen1981, история, 3 года назад, По-английски

Hi guys, hope you are doing well. I wanted to create my debug template but I can't get around this error?

code
error

Can somebody please help me? Thanks in advance.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Just erase the second overloading

»
3 года назад, # |
Rev. 2   Проголосовать: нравится +7 Проголосовать: не нравится

Is this the real issue you are having?

If yes, then it doesn't make any sense to have the second function, so erasing as suggested is an option.

If no, then describe it clearly instead of converting the real problem to something that does not make any sense.

Actually, the problem is not connected to ostream in any sense, it's connected to templates.

template<class T>
void function(T a) {}

void function(int a) {}

Compiler does not know what function to call when function(0) is to be executed.