warnings, errors;source code is included
- From: "* *" <msg124 hotmail com>
- To: gnome-devel-list gnome org
- Subject: warnings, errors;source code is included
- Date: Sun, 14 Nov 1999 10:30:59 PST
Hi,
I am getting warnings and errors like "implicit declarations .. and return
type defualts to int"
from the following source code. This ia oneof the examples in "Eric
Harlow"'s book.
(by the way very good book). I am new to programming and i have tried
everything i could.
#include <gtk/gtk.h>
int ptimer;
int nValue;
UpdateProgressTimer (gpointer data)
{
nValue += 1;
UpdatePrgress (nValue, 100);
if (nValue == 100) {
EndPorgress ();
gtk_timeout_remove (ptimer);
}
}
gint ButtonClicked (GtkWidget *widget, gpointer data)
{
nValue = 0;
StartProgress ();
ptimer = gtk_timeout_add (100, UpdateProgressTimer, data);
}
gint CloseAppWindow ()
{
gtk_main_quit ();
return (FALSE);
}
main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *button;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Progess bar");
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (CloseAppWindow), NULL);
button = gtk_button_new_with_label ("Progress bar");
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button) , "clicked",
GTK_SIGNAL_FUNC (ButtonClicked), NULL);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_show (window);
gtk_main ();
exit (0);
}
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]