Date: Fri, 19 May 2000 19:36:55 -0300 From: Gustavo Vieira Goncalves Coelho Rios <kernel@tdnet.com.br> To: questions@freebsd.org Subject: strange error Message-ID: <3925C207.789AC2AA@tdnet.com.br>
next in thread | raw e-mail | index | archive | help
What is the problem with this code. I simply can't figure out: #include <stdio.h> #include <string.h> char *a(char *); void t(char *); /* You should call it with at least one parameters, ex: ./a.out test <enter> */ void main(int argc, char *argv[]) { char *dir; ++argv; printf("%s\n", *argv); dir = a(*argv); t(dir); printf("%s\n", *dir); } void t(char *a) { while (*a) *a++ = '1'; } char * a(char *b) { return strdup(b); } -- Your mouse has moved. Windows NT must be restarted for the change to take effect! Reboot now? [ OK] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3925C207.789AC2AA>