MESSAGE
DATE | 2005-01-25 |
FROM | Steve Milo
|
SUBJECT | Re: [hangout] Simple C question
|
This is just one trivial reason out of many complicated ones why learning C in a classroom setting is the right way to go. There are too many nuances that can not be picked up without atleast some kind of formal education or hand-holding.
Steve M
On Tue, 25 Jan 2005, James Linder wrote:
> > > > On Tuesday 25 January 2005 03:21 pm, Inker, Evan wrote: > > Check this out > > > > strcopy.c > > > > .............. > > > > > > If I have three strings: > > char *str1; > > char str2[]; > > char str3[10]; > > > > how do I copy the info from str1 to str2? > > > > how do I copy the info from str1 to str3? (I imagine it is the same, and I > > realize I will loose data if strlen(str1)>10) > > Watch out using strcopy for copying str1 to str3. From what I understand > it'll keep writing after the end of the str3 array. I think there is an > nstrcopy() function you could use too that you can tell exactly how many > elements to copy from one char array to another. > > Jamey > ____________________________ > NYLXS: New Yorker Free Software Users Scene > Fair Use - > because it's either fair use or useless.... > NYLXS is a trademark of NYLXS, Inc >
____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|