Re: c++內如何得到物件的名稱呢?
※ 引述《journeyman@kkcity.com.tw (㊣"MORTAR─COMBAT─")》之銘言:
: 標準C++好像沒有物件名稱這回事吧 你要自己做進去
class T{};
std::cout << typeid(T).name();
缺點是不同實做結果不同
--
#!/usr/bin/ruby [露比] /Programming (Kn|N)ight/ 看板《Ruby》
# if a dog nailed extra legs that http://www.ptt.cc/bbs/Ruby/index.html
# walks like an octopus, and Welcome ~Ruby@ptt~
# talks like an octopus, then ◢█◣ http://www.ruby-lang.org/
# we are happy to treat it as █ http://www.ruby-doc.org/
# if it were an octopus. ◥ ◤ http://www.rubyforge.org/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.72.203
→
07/07 22:23, , 1F
07/07 22:23, 1F
→
07/07 22:26, , 2F
07/07 22:26, 2F
討論串 (同標題文章)