I want to return an empty vector at the end of my function. Does the following all equivalent? How to understand each of them?
return vector<int>();
return vector<int>{};
return NULL;
The following is my understanding:
1.vector<int>()
means creating an empty vector object, which is uninitialized so it's NULL.
2.vector<int>{}
means creating an empty vector, which has a size 0.
Is there a difference between size 0 and NULL? Thanks a lot~