指向指针的常量引用了解

转自:chatgpt 1.介绍 struct Person{ uint32_t age; }; Person* getP(){ Person* p =new Person(); p->age = 5; return p; } int main() { const auto & pp = getP()
posted @ 2024-05-31 01:14  lypbendlf  阅读(2)  评论(0编辑  收藏  举报