There is an important difference between the two methods:
if(A* test = dynamic_cast<A*>(&someClassCVar)) {
// someClassCVar is A or publicly derived from A
}
Whereas:
if(typeid(someClassCVar) == typeid(A)) {
// someClassCVar is of class A, not a derived class
}