How to save sensor value in EEPROM? (ESP8266)?

I have tried to use EEPROM.put() and EEPROM.get() but I am getting error messages with

'template T& EEPROMClass::get(int, T&)'

and

no matching function for call to 'EEPROMClass::get(int&)'

This does not happen if I used EEPROM.write and EEPROM.read.