cppdatabase.cc
changeset 94 c100ba6939e3
parent 90 d494813f9e5b
child 169 df7c720bcaa6
equal deleted inserted replaced
93:66b3596f71b6 94:c100ba6939e3
    24 
    24 
    25 void read_db_entry (std::ifstream& in)
    25 void read_db_entry (std::ifstream& in)
    26 {
    26 {
    27     std::cout << "clear eof" << std::endl;
    27     std::cout << "clear eof" << std::endl;
    28     in.clear ();
    28     in.clear ();
    29     std::cout << "seek status: " << in.seekg (0, std::ios::beg) <<
    29     in.seekg (0, std::ios::beg);
    30         std::endl << std::endl;
       
    31 
    30 
    32     struct Person p;
    31     struct Person p;
    33 
    32 
    34     while ((in.read ((char *)&p, sizeof (Person))) != NULL) {
    33     while ((in.read ((char *)&p, sizeof (Person))) != NULL) {
    35         std::cout << p.lastname << ", " << p.firstname << ", " <<
    34         std::cout << p.lastname << ", " << p.firstname << ", " <<