Re: [gtk-list] gtkwidget + sprintf = bug ??
- From: John Ellis <johne bellatlantic net>
- To: ryo <P Loubigniac bton ac uk>
- Cc: gtk-list redhat com
- Subject: Re: [gtk-list] gtkwidget + sprintf = bug ??
- Date: Sat, 30 May 1998 12:56:32 -0400
ryo writes:
>I have a problem when combining sprintf and 6 declarations of widget
>pointers. Sounds strange but I can explain. Look at the function end of
>this mail:
>
>[extra snipped]
>
>Hope someone will be abble to help.
It looks like you declared str as a pointer:
char *str;
Then printed to it without allocating the space:
sprintf(str,"%d",i);
Either use:
char str[whatever_size_you_need];
or malloc the space first.
John
--
John Ellis <gqview@geocities.com>
http://www.geocities.com/SiliconValley/Haven/5235/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]