Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私には機能があります
void foo(string *input) { string temp = ""; input->swap(&temp); }
しかし、これは機能していないようです...理由は temp が一時変数であるため、この関数を離れると割り当てが解除されると思いますか?