I cannot return pointer to local variable, but I can return pointer to data of local struct in c?

后端 未结 0 1744
傲寒
傲寒 2021-01-07 08:23

I know returning pointer to local variable is not a good idea, because the stack used for that variable will be reused. As so:

#include 

int *         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题