Re: compile error
- From: Olexiy Avramchenko <olexiy ctech cn ua>
- To: Aaron Yang <porsche1904 yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: compile error
- Date: Fri, 17 Dec 2004 09:34:43 +0200
Aaron Yang wrote:
hi everyone,
Hello
does anyone know why i get the following error:
passing arg 2 of `g_timeout_add' makes pointer from
integer without a cast
when i write my code as such:
g_timeout_add (1000, time (NULL), G_OBJECT (button));
Remove "(NULL)" characters, with them you're putting the result of the
time as parameter, not a pointer to the "time" function. You have to use
smth like: g_timeout_add (1000, (GSourceFunc)time, button).
PS: you shouldn't use name "time" as a name for your function because
it's standard function from the C library.
and time function is as follows:
gint time( gpointer data )
{
/* some code */
}
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]