S
stinkinrich88
Hello!
I'm really new to c++. I've been doing java for a while though.
I'm using linux so I wanted to make a gtk+ gui application. I want to
make a simple calculator to help me learn, so, say I want three
buttons with labels "1", "2" and "3", how can I change the following
code to work:
GtkWidget *button;
int i;
for (i = 0; i<3; i++);
{
button = gtk_button_new_with_label (i);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK
(callback), (gpointer) "button 2");
gtk_table_attach_defaults (GTK_TABLE (table), button, i, (i+1), 1,
2);
gtk_widget_show (button);
}
thanks!!!!!
I'm really new to c++. I've been doing java for a while though.
I'm using linux so I wanted to make a gtk+ gui application. I want to
make a simple calculator to help me learn, so, say I want three
buttons with labels "1", "2" and "3", how can I change the following
code to work:
GtkWidget *button;
int i;
for (i = 0; i<3; i++);
{
button = gtk_button_new_with_label (i);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK
(callback), (gpointer) "button 2");
gtk_table_attach_defaults (GTK_TABLE (table), button, i, (i+1), 1,
2);
gtk_widget_show (button);
}
thanks!!!!!