String s = "cow";
Serial.printlnf("The %s jumped over the moon", s.c_str());
"%s" expects a C string (char*) as source and not a String object. By use of c_str() your String object will hand you back a (char*).
This is what the error message is telling you - less trivially worded tho’
Maybe at some point there will be an overload for the cast operators in the String class, but for now use this.
I expected %s to take a String, and not a C string. The Serial.printf() documentation threw me off, as it used Time.timeStr() as an example. The Time.timeStr() documentation in turn, however states that Time.timeStr() returns a String.
…and, also learning to be more careful not to confuse C strings with Strings…
Sorry about that - I’ve fixed up the documentation accordingly. I was in a pinch and assumed the implicit conversion operator would have worked, but clearly not…