parveen1981's blog

By parveen1981, history, 3 years ago, In English

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.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Just erase the second overloading

»
3 years ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

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.