secury swprintf without crt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ig3v10@gmail.com

    secury swprintf without crt

    Hi ,
    i have advice on the folloing code:


    wchar_t* day = new wchar_t [11];
    swprintf(day,L" %4d-%2d-%2d",yy,mm,dd) ;

    how to make sure that my 'day' didn't get string bigger then 20 chars?

    found:
    swprintf_s(day, size,L"%4d-%2d-%2d",yy,mm,dd) ;
    but it requires crt

    any suggestions?

    ~igRek

Working...