什么是悬空的指针?
void foo(const std::string name){
// will it be Dangling pointer?!, with comments/Answer
// it could be if in new_foo, I store name into Global.
// Why?! And what is safe then?
new_foo(name.c_str());}void new_foo(const char* name){
// print name or do something with name... }
LEATH
DIEA
跃然一笑
四季花海
随时随地看视频慕课网APP
相关分类