I am calling a constructor in ClassA and want to have the resulting object be of a different class (ClassB) if a certain condition is met. I\'ve tried replacing the first a
Don't try to pervert the purpose of constructors: use a factory function. Calling a constructor for one class and being returned an instance of a different class is a sure way to cause confusion.