I need some help in converting following format using strcat function instead of s printf.
const char* const MSG_STAMP_PRINTF_FORMAT = "%c %04d-%02d-%02d %02d:%02d:%02d.%03d";
char cMsgStamp[500];
char cSevChr = 'I';
struct tm gmt;
// Calculate Day/Hour/Min/Sec
gmtime_r((time_t *)&pMsg->iSysTimeSec, &gmt);
int iSysTimeMs = 100;
// Format the begining of the message, the message stamp
sprintf(&cMsgStamp[0],
MSG_STAMP_PRINTF_FORMAT,
cSevChr, gmt.tm_year+1900, gmt.tm_mon + 1, gmt.tm_mday, gmt.tm_hour, gmt.tm_min, gmt.tm_sec,iSysTimeMs
); is 0x%s\n", n3);
instead of using sprintf, i have to get same info which is present in cMsgStamp above using number of strcat functions.
can any one help me on this. Thanks! Venkata RKA