1. Changed this
  2.  
  3. Item::Item(char *name, double weight) {
  4.  
  5. name = nullptr;
  6. weight = 0;
  7. Item::setName(name);
  8. }