Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [~]% cat a.c
- #include <stdio.h>
- void f(const char **s) {
- printf("%s\n", *s);
- }
- int main(int ac, char **av) {
- f(&av[0]);
- return 0;
- }
- [~]% gcc a.c && ./a.out
- a.c: In function ‘main’:
- a.c:8:2: warning: passing argument 1 of ‘f’ from incompatible pointer type
- a.c:3:6: note: expected ‘const char **’ but argument is of type ‘char **’
Add Comment
Please, Sign In to add comment