cout<<"The "<<familyname<<" family with "<<familia.count()<<" is created."<<endl;
return 0;
}

The program runs, but it terminates abnormally right after when I enter the family name. After some basic debugging, I noticed that the problem is apparently from the count() function, but I can't see what's wrong.

Any help is appreciated.

11-01-2006

vart

Here is what you do

Code:

head = NULL; //in constructor

p = head; //in count

while(p->next) //crash

in the count - check starting from the current node, not the next node.

PS. You have also issues whith copying the strings in your code, you'll see them when you'll start adding strings... So may be its time to switch to string class