Re: I'm sorry...
- From: Tomas Ogren <stric ing umu se>
- To: sml13 cornell edu
- Cc: gnome-list gnome org
- Subject: Re: I'm sorry...
- Date: Tue, 1 Dec 1998 04:05:17 +0100
On 30 November, 1998 - sml13@cornell.edu sent me these 1.4K bytes:
> Good point...BUT, this dies too:
>
> #include <stdio.h>
> #include <string.h>
>
> void main() {
> char* var = "hey you";
>
> printf ("%s\n", strtok (var, " "));
> }
That's because you're doing the exact same thing.
read: man strdup, man malloc, man free, man strcpy
/Tomas
--
Tomas Ögren, stric@ing.umu.se, http://www.ing.umu.se/~stric/
|- Student of Computer Science at the University of Umeå
`- Sysadmin at {ing,acc}.umu.se
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]