Re: newbie question: connecting signals to callbacks



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???

#include <stdio.h>
#include <string.h>

int main(void) {
  puts("hello world", "hello world", "hello world");
  strcmp("abc");
}

$ gcc foo.c
foo.c: In function `main':
foo.c:5: error: too many arguments to function `puts'
foo.c:6: error: too few arguments to function `strcmp'

Thanks!

Neil



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