Answer the question
In order to leave comments, you need to log in
The number 0 as a symbol?
Hello, I just came across an interesting (as it seemed to me) feature. I'm not sure exactly why, but when calling overloaded functions with a value of 0, an error pops up
call to member function 'SetAttrib' is ambiguous, and therefore it is necessary to cast this value to an int. Is this really due to the old understanding by the compiler that 0 == nullptr? Or am I not understanding something?
Answer the question
In order to leave comments, you need to log in
>weird that 0 and nullptr are the same thing to the compiler.
and they should be the same by definition.
>call to member function 'SetAttrib' is ambiguous
means you have a function that accepts both an int and a pointer. and 0 can be both
Or am I not understanding something?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question