I'm playing with unique_ptr right now and I'm not sure of the behavior of the code below. The show() method show a browse dialog for a file selection and returns a unique_ptr but if the user cancel it returns nullptr.
Even if I return a nullptr I can call the get() method of unique_ptr. Forgive my "maybe" stupid question but what is happening to be possible. Something about objects still puzzles me.
Ok I get it now. I thought the unique_ptr did not exist when I passed a nullptr. My mistake. Thanks.
Note: I've no idea about the type BrowseFileSystem
I hope so!... It's a class I made. I'm coding all kind of small stuff like this to get used to the concept of OO and C++.
Give me few weeks and maybe I'll be using std::wstring instead of the old wchar array or std::vector instead of c-style array. It's not easy to change an old way of thinking :-)