-1
这段代码做了什么?Arduino EEProm.h代码
EERef(const int index)
: index(index) {}
这是一个结构里面像这样...
/***
EERef class.
This object references an EEPROM cell.
Its purpose is to mimic a typical byte of RAM, however its storage is the EEPROM.
This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell.
***/
struct EERef{
EERef(const int index)
: index(index) {}
//Access/read members.
uint8_t operator*() const
{
return eeprom_read_byte((uint8_t*) index);
}
operator const uint8_t() const
{
return **this;
}
.....等等....
我已经完全忘记了我的C++。有人请记住我的记忆?
请不要使用C标签标记C++问题。 C标签用于C语言问题。 –
_“我完全忘记了我的C++。”然后拿起你的教科书并提醒你自己。有关Stack Overflow的问题需要事先研究。 –