xtian on Tue, 18 Apr 2000 22:46:44 -0400 (EDT)


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

[Bclug] weird parse errors


Okay I'm still new to C but I can't, for the life of me figure out what's going on.

I'm writing a callback for program i'm doing in gtk. it looks like this:

/* callback for the "I drank one" button */
void button_drank_clicked (gpointer data)
{
   gchar * output[2] = { "Mountain Dew", "yoink" };

   gtk_clist_append( (GtkCList *) data, output);

   return;
}	

now when I just have that as part of my code, everything compiles, and I get Mountain Dew and yoink in the window. but let's say, just for the heck of it, (and this actually comes from something else that I couldn't do, but this is a very simple test). I add a printf statement (yes, stdio.h is included).

void button_drank_clicked (gpointer data)
{
   printf("Wokka, Wokka, Wokka!\n");
	
	gchar * output[2] = { "Mountain Dew", "yoink" };

   gtk_clist_append( (GtkCList *) data, output);

   return;
}

okay, now I get a parse error before * on the gchar line (so says the compiler). Someone please tell me what's going on. I'm at my wit's end.

Any Help is GREATLY appreciated.

xtian betz

p.s. I'm trying to insert the time of day instead of "yoink". Whenever I try to make a string containing the time (using strftime()) it does the same parse error thing that it does with the simple printf statement

_______________________________________________
Bclug mailing list
Bclug@bclug.org
http://parkyourshere.com/mailman/listinfo/bclug