Author
anonymous
about 7 years ago
Language
Compiler
Options
Author
anonymous
about 7 years ago
$
prog.c: In function 'main':
prog.c:23:80: warning: passing argument 4 of 'for_loop' from incompatible pointer type [-Wincompatible-pointer-types]
for_loop(person, person + sizeof(person) / sizeof(*person), sizeof(person1), print_person);
^~~~~~~~~~~~
prog.c:9:63: note: expected 'void (*)(void *)' but argument is of type 'void (*)(person1 *)' {aka 'void (*)(struct <anonymous> *)'}
void for_loop(void* base, void* end, size_t elem_size, void (*func)(void* it)){
~~~~~~~^~~~~~~~~~~~~~~
1
2
Exit Code:
0