functions returning char pointer

后端 未结 12 1316
醉梦人生
醉梦人生 2020-12-03 19:12

I came across lot of functions returning char pointers in one legacy application. Some of them returning pointers to local character arrays. It seems to be causing crashes a

12条回答
  •  生来不讨喜
    2020-12-03 19:35

    Actually, the best would be to modify f1() to use malloc(). Your solution isn't near defined behavior.

提交回复
热议问题