First of all, to make it work just do the following changes
class B : virtual public A ...
class C : virtual public A
This problem in multiple inheritance is called the diamond problem. Check out this link to know more http://www.cprogramming.com/tutorial/virtual_inheritance.html