Welcome, Guest. Please login or register.

Author Topic: printf output to string possible ?  (Read 3164 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline CrazyProg

  • Newbie
  • *
  • Join Date: Oct 2004
  • Posts: 14
    • Show all replies
Re: printf output to string possible ?
« on: September 10, 2005, 01:18:36 PM »
Hi,

Instead of using 'sprintf' it is better to use 'snprintf'.  You specify how big the 'string' is so there isn't any chance of a buffer overrun crashing your program. :-)

If you are worried abount code size you could use the version in the newlib library.

Regards Neil.