assigning a string to another string

后端 未结 5 1008
没有蜡笔的小新
没有蜡笔的小新 2021-01-28 09:11

Why this code is not running? Why str1 is not assigned to str2 ?? I know i have an option of using strcpy but i wish to know the reason why this is not working??



        
5条回答
  •  执念已碎
    2021-01-28 09:35

    You may also use strdup() which allocates exact amount of space needed to store a copy.

提交回复
热议问题