Declaring widgets



I was just toying around with GTK and I was wondering whether you have
to declare widgets at the top of the function. I was more or less doing
a copy & paste thing from the tutorial and when I tried to put a
GtkWidget *window; mid-way through a source file I started getting
errors during compiles (error parsing * on line 288 [or something like
that]). The problem was solved by shifting the declaration up to the top
of the main() function but I was wondering why you had to declare
variables at the top of a funtion, it feels like Pascal all over again
:)



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