g_array_new problem with initializer element



Hello,

What am I doing wrong?  I would like an array of gchar values.  The
gchar values would be "lx1" "lx2" "dx1" that a user would select from a
GtkTreeView.  However, the following line gives an error:

GArray *serverlist = g_array_new(TRUE, FALSE, sizeof(gchar));

The error is:

main.c:58: error: initializer element is not constant

I went to 'codebase' (http://www.codase.com/) and found all sorts of
examples of how to create an array in glib ... why does this not work
for me?


-- Tony





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