Re: newbie question: connecting signals to callbacks
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Neil Zanella <nzanella gmail com>
- Cc: GTK List <gtk-list gnome org>
- Subject: Re: newbie question: connecting signals to callbacks
- Date: Sat, 6 Nov 2004 12:03:17 +0100
On Fri, Nov 05, 2004 at 08:47:49PM -0700, Neil Zanella wrote:
> On Tue, 2 Nov 2004 09:17:13 +0000, Tim Müller <t i m zen co uk> wrote:
>
> > Yes, it's fine to call a function with more arguments than it takes (in C).
>
> I think your explanation is missing some detail...
> could you explain that again please???
>
> puts("hello world", "hello world", "hello world");
It's always _technically_ _possible_ thanks to the calling
convention (i.e., on the low level), but it's not a _valid_
ISO _C_ to call functions with different arguments than it
has, so the compiler rejects it. Do
typedef void (*Foo)(const char*, const char*, const char*);
Typecast &puts to Foo and you can call it with three
arguments.
Yeti
--
Dynamic IP address is not a crime.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]