huihut
2025-07-27 19:53:17 +08:00
parent 48fd81d93b
commit 3ecb6a28aa
2 changed files with 2 additions and 2 deletions

View File

@@ -1173,7 +1173,7 @@ catch (bad_cast b) {
#### typeid
* typeid 运算符允许在运行时确定对象的类型
* type\_id 返回一个 type\_info 对象的引用
* typeid 返回一个 type\_info 对象的引用
* 如果想通过基类的指针获得派生类的数据类型,基类必须带有虚函数
* 只能获取对象的实际类型

View File

@@ -1180,7 +1180,7 @@ catch (bad_cast b) {
#### typeid
* The typeid operator allows determining the type of an object at runtime
* type \ _id returns a reference to a type \ _info object
* typeid returns a reference to a type\_info object
* If you want to get the data type of the derived class through the pointer of the base class, the base class must have a virtual function
* Can only get the actual type of the object