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;
v = w.class;
|bool b = dynamic_cast<Foo*>(f) != nullptr;
v = w::typeid;
Use Java to C++ Converter to convert from Java to C++.
Java and C++ Equivalents
Copyright © 1997 – 2018 Tangible Software Solutions, Inc.