The condition cp && *cp means if cp is not a null pointer and the object pointed by cp is not null, 0 or can be converted to false.