have 2 arrays, one is has values in and other hasn't. When we check with std::empty function, it sends false for array with values and true for other which is empty. It shouldn't be the other way around?
Please, don't rude. It's a beginner who would like to understand logic implementation of this function. Thanks
According to function name it's doing their work in right manner
Sure I know, but I wanna know why it does like that way? I think it should be -> false for empty array and true for other
Why do you think so?
If someone ask you by pointing towards a empty water bottle. Is the water bottle empty? What u will say
Yes means true
Exactly, but that's not what the function does here . Wait ...
I think I know why you think so. Empty is a negative association and non-empty is positive. True is positive and false is negative.
Обсуждают сегодня