There is no direct equivalent in C++ to the Java 'instanceof' operator, but you can replicate the behavior by testing the result of a 'dynamic_cast'.
|boolean b = f instanceof Foo;||bool b = dynamic_cast<Foo*>(f) != nullptr;|
Use Java to C++ Converter to convert from Java to C++.
Java and C++ Equivalents
Copyright © 1997 – 2019 Tangible Software Solutions, Inc.