Guest User

Untitled

a guest
Jan 22nd, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. [~]% cat a.c
  2. #include <stdio.h>
  3.  
  4. void f(const char **s) {
  5. printf("%s\n", *s);
  6. }
  7.  
  8. int main(int ac, char **av) {
  9. f(&av[0]);
  10. return 0;
  11. }
  12. [~]% gcc a.c && ./a.out
  13. a.c: In function ‘main’:
  14. a.c:8:2: warning: passing argument 1 of ‘f’ from incompatible pointer type
  15. a.c:3:6: note: expected ‘const char **’ but argument is of type ‘char **’
Add Comment
Please, Sign In to add comment