Problem saving settings to EEprom

Hi,

Is it only possible to write structures to EEprom? What if I have classes with pointers to each other?

In my Arduino Uno I have written a program that stores settings:

class DaySettings
{
  public:
   
    unsigned int dayNo ; //0-6, 7 = all
    boolean on;
      int hour;
    int minute;
     unsigned int ml;
    DaySettings *next;
    DaySettings( unsigned int dayy, boolean onn, unsigned int hourr, unsigned int minutee, unsigned int mll);
}  ; 

DaySettings::DaySettings( unsigned int dayy, boolean onn, unsigned int hourr, unsigned int minutee, unsigned int mll){
  dayNo = dayy;
  on = onn;
  hour = hourr;
  minute = minutee;
  ml = mll;
  
}


class Pump {
  public:
  
    unsigned int pompNo;  
   DaySettings *nextDay;
   Pump *next;
   Pump(unsigned int no);
  };
  Pump::Pump(unsigned int no) 
   { 
     pompNo = no;
    }

In the beginning I have:

  DaySettings DayStructAll_1(7, false, 3, 3, 1);
  DaySettings DayStructMonday_1(0, false, 3, 3, 1);
  DaySettings DayStructTuesday_1(1, false, 3, 3, 1);
  DaySettings DayStructWensday_1(2, false, 3, 3, 1);
  DaySettings DayStructThursday_1(3, false, 3, 3, 1);
  DaySettings DayStructFriday_1(4, false, 3, 3, 1);
  DaySettings DayStructSaturday_1(5, false, 3, 3, 1);
  DaySettings DayStructSunday_1(6, false, 3, 3, 1);
  
   DaySettings DayStructAll_2(7, false, 3, 3, 1);
  DaySettings DayStructMonday_2(0, false, 3, 3, 1);
  DaySettings DayStructTuesday_2(1, false, 3, 3, 1);
  DaySettings DayStructWensday_2(2, false, 3, 3, 1);
  DaySettings DayStructThursday_2(3, false, 3, 3, 1);
  DaySettings DayStructFriday_2(4, false, 3, 3, 1);
  DaySettings DayStructSaturday_2(5, false, 3, 3, 1);
  DaySettings DayStructSunday_2(6, false, 3, 3, 1);
  
   DaySettings DayStructAll_3(7, false, 3, 3, 1);
  DaySettings DayStructMonday_3(0, false, 3, 3, 1);
  DaySettings DayStructTuesday_3(1, false, 3, 3, 1);
  DaySettings DayStructWensday_3(2, false, 3, 3, 1);
  DaySettings DayStructThursday_3(3, false, 3, 3, 1);
  DaySettings DayStructFriday_3(4, false, 3, 3, 1);
  DaySettings DayStructSaturday_3(5, false, 3, 3, 1);
  DaySettings DayStructSunday_3(6, false, 3, 3, 1);
  
   
  Pump pump1(1);
  Pump pump2 (2); 
  Pump pump3  (3); 

     pump1.next = &pump2;
  pump2.next= &pump3;
  pump3.next=&pump1;      
  DayStructAll_1.next = &DayStructMonday_1;
   DayStructMonday_1.next = &DayStructTuesday_1; 
   DayStructTuesday_1.next = &DayStructWensday_1;
  DayStructWensday_1.next = &DayStructThursday_1;
  DayStructTuesday_1.next = &DayStructWensday_1;
   DayStructThursday_1.next = &DayStructFriday_1;
  DayStructFriday_1.next = &DayStructSaturday_1;
   DayStructSaturday_1.next = &DayStructSunday_1;
  DayStructSunday_1.next =  &DayStructAll_1 ;
    pump1.nextDay = &DayStructAll_1;
  

    DayStructAll_2.next = &DayStructMonday_2;
   DayStructMonday_2.next = &DayStructTuesday_2; 
   DayStructTuesday_2.next = &DayStructWensday_2;
  DayStructWensday_2.next = &DayStructThursday_2;
  DayStructTuesday_2.next = &DayStructWensday_2;
   DayStructThursday_2.next = &DayStructFriday_2;
  DayStructFriday_2.next = &DayStructSaturday_2;
   DayStructSaturday_2.next = &DayStructSunday_2;
  DayStructSunday_2.next =  &DayStructAll_2 ;
    pump2.nextDay = &DayStructAll_2;
    
   
    DayStructAll_3.next = &DayStructMonday_3;
   DayStructMonday_3.next = &DayStructTuesday_3; 
   DayStructTuesday_3.next = &DayStructWensday_3;
  DayStructWensday_3.next = &DayStructThursday_3;
  DayStructTuesday_3.next = &DayStructWensday_3;
   DayStructThursday_3.next = &DayStructFriday_3;
  DayStructFriday_3.next = &DayStructSaturday_3;
   DayStructSaturday_3.next = &DayStructSunday_3;
  DayStructSunday_3.next =  &DayStructAll_3 ;
    pump3.nextDay = &DayStructAll_3;

This is how I store and read settings:

      EEPROM_writeAnything(0, pump1);

After resetting arduino I read settings, but there are some problems mainly with pointers, seems that links between objects are lost or wrong, I cannot navigate between pumps and days.

Here pX is not the same as pump1, it should read data from EEProm as they were stored from pump1 before

Pump pX(9);
  EEPROM_readAnything(0, pX);
   curSettings = pX.nextDay;
currentPump = pX;

How have you made certain pointers are going to be pointing to the same place each time the board resets?

I think I understand now my mistake.
This relations cannot be saved:
pump1.next = &pump2;
pump2.next= &pump3;
pump3.next=&pump1;

They are only pointers to not existing objects after reset. I dont even save pump2 and 3.

I think I will wrap all settings in some additional class and save this parent class to EEprom and then recreate the pointer structure.