Implementing # flag in qnx.

Hi,
I have been trying to implement Format function of CTime class(MFC) in qnx.
For that i used strftime(size_t strftime( char * s,
size_t maxsize,
const char * format,
const struct tm * timeptr ))
While in visual studio, format (%s, %M etc.) could be passed on along with # flag(EG. %#I) to remove leading zero, while the same is not the case with qnx and its not idenfied, please suggest an alternative.

Look at struct tm in /usr/include/time.h. It has all the variables. You can format your string any way that you wish with sprintf().

sprintf does allows formatting, but it seems it doesn’t provide any flag to remove the leading zero, please correct me if im wrong…

I don’t know why you would be getting a leading zero. Can you post your sprintf statement.