user31105: I want to use a lot of .h/.cpp files to be used by my ino sketch.
In one of these .cpp files (and later more) I want to use constant arrays (like lookup tables). To save SRAM I want to use PROGMEM.
What worked before in the Ino sketch is:
const uint8_t _red[]   PROGMEM = { 0, 9, 10, 220, 230, 240, 255 };

But when I put the line above in a .h or .cpp file I get the error:
Par.h:13:25: error: expected initializer before 'PROGMEM'

Should I include something or can't I use PROGMEM in a .h/.cpp file?

user31105: I already found the answer.
Include:
#include <avr/pgmspace.h>

Update
See also remark of AnT, which is a more generic (and in most cases better solution):
#include "Arduino.h"

(just to help others with the same problem).

31105: <p>I want to use a lot of <code>.h</code>/<code>.cpp</code> files to be used by my <code>ino</code> sketch.
In one of these .cpp files (and later more) I want to use constant arrays (like lookup tables). To save SRAM I want to use <code>PROGMEM</code>.</p>

<p>What worked before in the Ino sketch is:</p>

<pre><code>const uint8_t _red[]   PROGMEM = { 0, 9, 10, 220, 230, 240, 255 };
</code></pre>

<p>But when I put the line above in a <code>.h</code> or <code>.cpp</code> file I get the error:</p>

<pre><code>Par.h:13:25: error: expected initializer before 'PROGMEM'
</code></pre>

<p>Should I include something or can't I use <code>PROGMEM</code> in a <code>.h</code>/<code>.cpp</code> file?</p>
 31105: <p>I already found the answer.</p>

<p>Include:</p>

<pre><code>#include &lt;avr/pgmspace.h&gt;
</code></pre>

<p><strong>Update</strong></p>

<p>See also remark of AnT, which is a more generic (and in most cases better solution):</p>

<pre><code>#include "Arduino.h"
</code></pre>

<p>(just to help others with the same problem).</p>
