タグ付けされた質問 「typeid」

6
C ++での「typeid」と「typeof」
C ++ typeidとtypeofC ++の違いは何ですか。これが私が知っていることです: typeidドキュメントに記載されている TYPE_INFO C ++ヘッダファイルに定義されているのTypeInfo。 typeofCのGCC拡張およびC ++ Boostライブラリで定義されています。 また、ここに、私が作成したテストコードテストがあります。ここでは、typeid期待した結果を返さないことがわかりました。どうして? main.cpp #include <iostream> #include <typeinfo> //for 'typeid' to work class Person { public: // ... Person members ... virtual ~Person() {} }; class Employee : public Person { // ... Employee members ... }; int main () { …
158 c++  typeof  typeid 
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.