issue with character array

sol
Last edited on

ptr -> s_name[100] = name[100];


sets the 101st element of s_name to the 101st element of name. Note that neither s_name nor name have 101st elements.

http://www.cplusplus.com/reference/cstring/strcpy/
Last edited on
Thanks I got it.
Last edited on
Is there some reason you deleted your post?
closed account (Dy7SLyTq)
yes. he solved it so he took it off
Maybe I should have been more specific... I wanted to know if there was a good reason. The only difference between made by deleting your post and leaving it up after having it solved is that in the former case no one else can learn anything from it.
Topic archived. No new replies allowed.