Question: Please answer this !! WHAT IS THE ONE SPECIFIC PROBLEM WITH THIS PROGRAM ? (there are no syntax errors) #include using namespace std; class A

 Please answer this !! WHAT IS THE ONE SPECIFIC PROBLEM WITHPlease answer this !!

WHAT IS THE ONE SPECIFIC PROBLEM WITH THIS PROGRAM ? (there are no syntax errors) #include using namespace std; class A {public: string name; public: virtual void setname(string n) = 0;}; class B: virtual public A {public: void setname(string n) {name = n;}}; class C: virtual public A {public: void setname(string n) name = n;}}; class D: public B, public C {public: void setname(string n) {B:: setname(n);}}; int main() {A A1; B B1; C C1; D D1; A1 setname("Anne"); B1. setname ("Bob"); C1 setname("Charlie"); D1. setname("David"); system ("pause"); return 0;}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!