empty() vs Null

Apr 30, 2010 at 2:26pm
do I need to say:
1
2
if (item.empty() || item==NULL){
}


or does empty() return true if item is NULL also?
Apr 30, 2010 at 3:18pm
item doesn't seem to be a pointer (since it has members accessible via . ), so comparing it to NULL doesn't make much sense
what is it?
Apr 30, 2010 at 4:16pm
If you are using QString or something like that then there is a difference.
If you are using something else, I don't know.
Read the documentation.
Topic archived. No new replies allowed.