Hello
I'm trying write program in GTK/C. Inside one callback function (called on button click) I read data from file and allocate them dynamic.
Code:
extern gfloat *X;
void on_wczytaj_clicked (GtkButton *klawisz, gpointer user_data)
{
...
X = g_new0 (gfloat, number_of_points);
....
X[i]=num;
....
}
Now I need to have access to this X from another callback function.
I thought if X is global I have access to data ... but not.
Code:
void other_call_function (GtkButton *klawisz2, gpointer user_data)
{
...
printf(" X=%d", X[i]);
....
}