79415926

Date: 2025-02-05 19:15:15
Score: 1
Natty:
Report link

This is a simple mistake . dateTimeMilDS3231() is returning a String and asprintf in formatting string "%s" expect a C-style string . String can be "converted" to C-style string with calling .c_str() on it . : Correct code is :

char *buf;
asprintf(&buf, "%lu\t%s\n", now(), dateTimeMilDS3231().c_str() );
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: g1ra