title: arduino error: expected initializer before * token
body: <pre><code>#include &lt;WProgram.h&gt;
  #include &lt;EEPROM.h&gt;
  
  template &lt;class T&gt; int EEPROM_writeAnything(int ee, const T&amp; value)
  {
      const byte* p = (const byte*)(const void*)&amp;value;
      int i;
      for (i = 0; i &lt; sizeof(value); i++)
      EEPROM.write(ee++, *p++);
      return i;
  }
  
  template &lt;class T&gt; int EEPROM_readAnything(int ee, T&amp; value)
  {
      byte* p = (byte*)(void*)&amp;value;
      int i;
      for (i = 0; i &lt; sizeof(value); i++)
          *p++ = EEPROM.read(ee++);
      return i;
  }
  </code></pre>
  
  <p>Hi community,
  I'm getting the following errors for my code:</p>
  
  <blockquote>
    <p>EEPROMAnything.h: In function 'int EEPROM_writeAnything(int, const T&amp;)':<br>
    EEPROMAnything.h:6: error: expected initializer before '*' token<br>
    EEPROMAnything.h:9: error: 'p' was not declared in this scope<br>
    EEPROMAnything.h: In function 'int EEPROM_readAnything(int, T&amp;)':<br>
    EEPROMAnything.h:15: error: 'byte' was not declared in this scope<br>
    EEPROMAnything.h:15: error: 'p' was not declared in this scope<br>
    EEPROMAnything.h:15: error: expected primary-expression before ')' token<br>
    EEPROMAnything.h:15: error: expected primary-expression before 'void'  </p>
  </blockquote>
  
  <p>Not sure what I'm missing in this set. Would love feedback!<br>
  Thanks</p>