Skip to content

Commit

Permalink
Update typeid_01.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
necatiergin authored Mar 9, 2023
1 parent 3edce2c commit c5f08e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 0560_RTTI/typeid/typeid_01.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <iostream>
#include <typeinfo>

class Base {
public:
Expand All @@ -17,5 +18,5 @@ int main()
Der der;
Base* ptr{ &der };

std::cout << std::boolalpha << (typeid(*ptr) == typeid(Der)) << "\n";
std::cout << std::boolalpha << (typeid(*ptr) == typeid(Der)) << '\n';
}

0 comments on commit c5f08e9

Please sign in to comment.