Re: C question




You should consider declaring your structure like that

typedef struct a_item{
g_char b[ MAX_G_CHAR_SIZE ];
} A_ITEM;

Use strcpy or iits equivalent to copy it. I think that's a good way to
do that because g_malloc will that allocate the right size for you.

Your code did not allocate space for the text string.











[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]