NULL, nullptr and How to Return None Objects

NULL: 0 or 0L

nullptr: a type-safe NULL pointer

Return None Objects: we need to return by pointer rather than by reference. For example:

Person* Person::search()
{

else:
return nullptr;
}

Advertisements