Re: newbie question: connecting signals to callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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.
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux