writing more than a byte a time in EEPROM

Hi there. I have been trying to write a value read from an analog pin to EEPROM but don't want to convert it to a byte because i'd lose accuracy so i found this library. im not sure if anyone has any experience with it but i have managed to write a single Int fine (all the examples only write a single value at once) but as soon as i try to write more than one as per the following code i get garbage results. if anyone knows what might be going on or have an alternative method for writing values larger than bytes to EEPROM id love to hear it. many thanks.

#include <EEPROMex.h>

void setup() {
  Serial.begin(9600);

  EEPROM.writeInt(0, 5);  
//  EEPROM.writeInt(1, 6);


  Serial.println(EEPROM.readInt(0));
//  Serial.println(EEPROM.readInt(1));


}

void loop() {

}

values for the non commented code are as expected but as soon as i uncomment i get the values '1541 and 6'. its only the last value which is ever correct....

When you write an int, two bytes, how many addresses are you writing to? You MUST increment the address by the size of the data written, NOT by one.

Why not use the standard EEPROM library put() and get() functions ?

Note that it is still necessary to allow for the size of the variable being written.

Did you look at "https://www.arduino.cc/en/Tutorial/EEPROMWrite" and "https://www.arduino.cc/en/Tutorial/EEPROMRead"? They process in BYTES as well, but you can convert to and from floating point as desired. You need to know how much to increment the index/pointer based on variable type size: INT (2 bytes?) etc. Varies with processor.

PaulS:
When you write an int, two bytes, how many addresses are you writing to? You MUST increment the address by the size of the data written, NOT by one.

Doh! thanks, that sorted it. UKHeliBob and DaleScott thanks also I will have a look at both of your suggestions but for now I have what I am looking for.