Re: glib array help

2012-09-11 Thread Rudra Banerjee
On Tue, 2012-09-11 at 12:16 +0700, Ardhan Madras wrote: > As I already told you, this is a basic programming error but you event > didn't notice it. So please find good C books and references out there > and start learn how to write C program. > Yes, I am also feeling that I need to learn C a fres

Re: glib array help

2012-09-10 Thread Ardhan Madras
statement with no effect [-Wunused-value]: > for (i==0;i<=100;i++){ format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char **’ [-Wformat]: > fscanf(finp, "%s", &alst[i]); And in this case, you need to allocate char *arls[100] before using it. As I already told you, this is a

glib array help

2012-09-10 Thread Rudra Banerjee
Dear friends, I am trying to learn using glib array. From the gtk documentation, I managed to write this piece of code: #include #include int main(int argc, char** argv) { int i; FILE *finp; char *alst[100]; GArray* a = g_array_new(FALSE, FALSE, sizeof(char*)); finp=fopen("fauth","r"); for (i==