Re: after strncpy
From: Panda (panda@panda.com)
Date: 04/22/03
- Next message: chehodettolamia: "Re: Recursive directory size function"
- Previous message: Panda: "Re: after strncpy"
- In reply to: Panda: "Re: after strncpy"
- Next in thread: Valentin Nechayev: "Re: after strncpy"
- Reply: Valentin Nechayev: "Re: after strncpy"
- Reply: Dennis Melentyev: "Re: after strncpy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: " Panda" <panda@panda.com> Date: Wed, 23 Apr 2003 00:44:57 +0800
sprintf(org_str,"/tmp/fifo.%d",getpid())
" Panda" <panda@panda.com> ¼¶¼g©ó¶l¥ó news:3ea56d61@shknews01...
> YUP~
> that string is (org_str,"/tmp/fifo.%d",getpid())
> "Dennis Melentyev" <dennis@ksf.kiev.ua> ?????
> news:b83q06$ae2$1@queen.ksf.kiev.ua...
> > Hello, !
> > You wrote on Wed, 23 Apr 2003 00:04:09 +0800:
> >
> > P> my problem as below~
> > P> strncpy(new_str, org_str, strlen(org_str)-3);
> > P> printf("NEW = *%s*",new_str);
> >
> > P> but the result is
> > P> NEW=**
> >
> > P> i have do that new_str[strlen(org_str)-3] = '\0';
> >
> > P> but also like that~~
> > P> how can i fix it~~
> > P> thanks~
> > Are you sure that strlen(org_str) >3 ?
> >
> > --
> > Dennis Melentyev
> > SW Developer @ KSF, Kiev, Ukraine
> > www.ksfltd.com
> > UIN: 83986781
> >
>
>
- Next message: chehodettolamia: "Re: Recursive directory size function"
- Previous message: Panda: "Re: after strncpy"
- In reply to: Panda: "Re: after strncpy"
- Next in thread: Valentin Nechayev: "Re: after strncpy"
- Reply: Valentin Nechayev: "Re: after strncpy"
- Reply: Dennis Melentyev: "Re: after strncpy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]