strcat implementation

前端 未结 5 1164
暖寄归人
暖寄归人 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:11

    Allocate enough memory for the destination string.. ie atleast (length of source string + 1).

提交回复
热议问题