title: Compiler throws "Invalid initializer" when writing char const*
body: <p>I'm new to C programming so please help a fella out.
  When compiling I'm getting a "invalid initializer" problem.This is the relevant code.</p>
  
  <pre><code>void lcd_writePString(char const* string) {
    char c;
    while ((c = (char)pgm_read_byte(string++)))
    lcd_writeChar(c);
  }
  
  void os_errorPStr(char const* str) {
    SREG &amp;= 0b10111111; //Interrupts global deaktivieren
    lcd_clear();
    lcd_writePString(PSTR(str)); //THIS IS WHERE THE COMPILER THROWS OUT THE ERROR
    while (os_getInput()!=0b10000001){
      os_waitForInput();
    }
    lcd_clear();
    SREG |= 0b01000000;
   }
  </code></pre>
  
  <p>So why does my compiler throw out the error "invalid initializer"?
  The PSTR thing writes the string onto the flash memory of my micro controller. </p>
  
  <p>This is what PSTR does:</p>
  
  <pre><code> /** \ingroup avr_pgmspace
       \def PSTR(s)
  
      Used to declare a static pointer to a string in program space. */
   # define PSTR(s) ((const PROGMEM char *)(s))
   #else  /* !DOXYGEN */
   /* The real thing. */
   # define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &amp;__c[0];}))
   #endif /* DOXYGEN */
  </code></pre>