I need help getting this library to verify. I am using arduino version 1.0.5 this is the code I trying to get to verify.
#include <EEPROM.h>
#include <Arduino.h> // for type definitions
template int EEPROM_writeAnything(int ee, const T& value)
{
const byte* p = (const byte*)(const void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
EEPROM.write(ee++, *p++);
return i;
}
template int EEPROM_readAnything(int ee, T& value)
{
byte* p = (byte*)(void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
*p++ = EEPROM.read(ee++);
return i;
}
These r the error codes that I am getting
error: expected ',' or '...' before '&' token
error: ISO c++ forbids declaration of 'T' with no type
error: 'T' has not been declared
Thank you for any help you could provide. I am not sure what I'm doing wrong or what I could be missing to make it work.