strcat implementation

前端 未结 5 1158
暖寄归人
暖寄归人 2020-12-15 00:22

I tried to implement the strcat by myself, and I found the strcat implementation from Wiki like this......but when I use it, there is segmentation fault.

What\'s wro

5条回答
  •  误落风尘
    2020-12-15 01:02

    the code is okay.

    Looks like you have a problem in the calling code.

    Did you remember to allocate enough memory for the target string?

提交回复
热议问题