I 'm trying to define a sortcut of Serial.print
Without F() it works as expcted...I can't understand why F() throughs errors...
#define log(msg) Serial.print(F(msg))
#define logln(msg) Serial.println(F(msg))
file.cpp:269:5: note: in expansion of macro 'log'
log(number);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WString.h:38:74: error: array must be initialized with a brace-enclosed initializer
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
^
file.h:19:31: note: in expansion of macro 'F'
#define log(msg) Serial.print(F(msg))
Any help???