diff --git a/cppdatabase.cc b/cppdatabase.cc --- a/cppdatabase.cc +++ b/cppdatabase.cc @@ -30,7 +30,7 @@ struct Person p; - while ((in.read ((char *)&p, sizeof (Person))) != NULL) { + while ((in.read ((char *)&p, sizeof (Person))) != 0) { std::cout << p.lastname << ", " << p.firstname << ", " << p.position << std::endl; }