在C++中使用以下術語時,我感到非常困惑,並且總是讓我從C++中退出並且只能回到C,Java,Python。這些C++語句是什麼意思?
任何人都可以解釋我爲什麼使用它?
的例子中,我通過閱讀一遍又一遍地學習這個項目:https://github.com/RSATom/WebChimera/blob/master/src/Chimera.cpp
1 - boost::shared_ptr<Chimera> thisPtr = FB::ptr_cast<Chimera>(shared_from_this());
2 - opts.set_enable_fs(allowfs.convert_cast<bool>());
3 -
typedef boost::optional<std::string> param_type;
typedef const FB::variant& param_vtype;
什麼點呢<Chimera>
1在做什麼? 點2中的<bool>
在做什麼? 第4點是什麼意思?
您應該閱讀'boost :: shared_ptr <>'模板的文檔。 – 2015-03-25 10:28:00
你的問題中沒有「第4點」。 – milleniumbug 2015-03-25 10:40:11
如果你想做任何不平凡的事情,C++不是一種可以浸入腳趾的語言。你需要閱讀至少一本書來獲得它。 – 2015-03-25 11:13:30