chacha wrote:[color=blue]
> Al Bowers wrote:
>[color=green]
>>
>>
>>No, it is not valid.
>>*(h_ptr[6]) would yield a value representing the first
>>char in the char array to which h_ptr[6] is pointing.
>>Function strcpy requires the argument represent a value
>>pointing to a string.
>>
>>Since your description is in terms of char arrays (not strings),
>>you might be interested in using function memcpy. Be careful
>>not to extend beyond array boundries.
>>[/color]
>
>
> After a closer look at the codes, I found that "char *h_ptr[8]"
> seems to be an array of string pointers as when I print them out
> it prints from different places of a long string.
>
> Now if I want to copy the first line starting from where h_ptr[6]
> points to, how do I do it?[/color]
From your comments it seems impossible to decipher and
give you help. You need to be more descriptive with your
question. Show what is in the "long string". Show where
h_ptr pointers are pointing (how they were assigned).
Tell what you mean by "first line". Show
some code that might describe what you are doing.
--
Al Bowers
Tampa, Fl USA
mailto:
xabowers@myrapidsys.com (remove the x to send email)
http://www.geocities.com/abowers822/