View Single Post
  #5  
Old 07-16-2009, 06:03 AM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

I've hit this in my "trying to learn C++ adventure". The *_s functions are Microsoft only. For sprintf_s you might try the POSIX snprintf:

Code:
int snprintf(char *str, size_t size, const char *format, ...);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       snprintf(), vsnprintf(): _BSD_SOURCE || _XOPEN_SOURCE >= 500 ||
       _ISOC99_SOURCE; or cc -std=c99

 The  functions  snprintf()  and  vsnprintf()  write  at most size bytes
       (including the trailing null byte ('\0')) to str.
This is from the man pages with glibc version 2.2
Reply With Quote