SOLVED Progmem and strings

hi all, I am probably missing something very obvious but I have a problem I can't seem to fix.

this code produces strange results :

const char  PROGMEM string_to_print[] = " I would like to print this string"; 


void setup() 
{
  Serial.begin(115200);
  Serial.print("Jow");
  Serial.println(string_to_print);
}

void loop() 
{

}

Serial monitor prints this :

Jow? ? ? ? ? ? ? ? ? ? ? ? ? (a group of 8 and a group of 5 question marks)

(deleted)

Past five minutes I have been trying to delete my post... But could not find it...
Yes i have and understand it now...

I thought it worked just like using Serial.print(F("a string");

Kevin77:
I thought it worked just like using Serial.print(F("a string");

It pretty much does, but you need to cast the pointer type:

const char  PROGMEM string_to_print[] = " I would like to print this string";

void setup()
{
  Serial.begin(115200);
  delay(2000);
  Serial.print("Jow");
  Serial.println((__FlashStringHelper *)string_to_print);
}

void loop()
{}

Waw thank you very much, I think that should be added to the reference pages.

Can you explain how this works : (__FlashStringHelper *) is it a datatype?
Or can you point me to a place I can read up on this?

Or can you point me to a place I can read up on this?

Find where you installed the Arduino package, then
hardware/arduino/avr/cores/arduino/Print.h
hardware/arduino/avr/cores/arduino/WString.h
hardware/arduino/avr/cores/arduino/Print.cpp
hardware/arduino/avr/cores/arduino/WString.cpp

AWOL:
Find where you installed the Arduino package, then
hardware/arduino/avr/cores/arduino/Print.h
hardware/arduino/avr/cores/arduino/WString.h
hardware/arduino/avr/cores/arduino/Print.cpp
hardware/arduino/avr/cores/arduino/WString.cpp

Thanks AWOL! Why didn't I think of this...