[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: display integers in a clist
- From: Gus Koppel <gtk spamkiller bytechase cx>
- To: gtk-app-devel-list gnome org
- Subject: Re: display integers in a clist
- Date: Fri, 30 Jan 2004 09:13:49 +0100
parthasarathi s a wrote:
> You could use the C string libraries' sprintf() function to print the
> "number" into a string.-partha
>
> "Thomas Keaney" <se40319@cs.may.ie> wrote:
> > Would anyone know of how to convert an integer to a
> > character(convert 1 to '1') as I want to display this in a clist.
> > Also, I want to concatenate this to a word(for example MEMORY 1
> > ),where the word is MEMORY and the integer I want to display is 1 in
> > the clist. Thanks in advance.
A note in case you want to avoid programming bugs and safety hazards,
commonly around by the term "buffer overflows", for your application:
*NEVER* use sprintf ()! Always use snprintf () instead!
Failing to do so is the no. 1 reason for buffer overflows and related,
easily avoidable software failures. They are not an issue of novice
programmers only.
See
http://mail.gnome.org/archives/gtk-app-devel-list/2003-October/msg00344.html
for further information on that.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]