I'm stumped on a question which asks, how can you tell if the compiler makes the call in this example using late or early binding? The call in question is the third one, under the comment "Early binding (probably)." I wouldn't put it past the author for the solution to be to look at the assembly, but I'm just checking to see if there's another way (and if someone can give me a clue)...

Code:
#include <iostream>
#include <string>
using namespace std;

class Pet {
public:
  virtual string speak() const { return ""; }
};

class Dog : public Pet {
public:
  string speak() const { return "Bark!"; }
};

int main() {
  Dog ralph;
  Pet* p1 = &ralph;
  Pet& p2 = ralph;
  Pet p3;
  // Late binding for both:
  cout << "p1->speak() = " << p1->speak() <<endl;
  cout << "p2.speak() = " << p2.speak() << endl;
  // Early binding (probably):
  cout << "p3.speak() = " << p3.speak() << endl;

}