Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Problems With Multiple Inheritance
The following example presents a problem with multiple inheritance.
class Aclass
{
public :
void put()
:
}
};
class Bclass
class Cclass : public Aclass , public Bclass
void main()
A objA;
B objB;
C objC;
objA.put(); // From Class A
objB.put(); // From class B
objC.put(); // AMBIGUOUS -RESULTS IN ERROR
The above example has a class C derived from two classes A and B. Both these classes have a function with the similar name - put(), which suppose, the derived class does not have. The class C inherits the put() function from both the classes. When a call to this function is made using the object of the derived class , the compiler does not know which class it is referring to. In this case, the scope resolution operator has to be used to state the correct object . Its usage is very simple. The statement giving an error from the above instance has to be replaced with the following :
objC.A::put(); // for class A
objC.B::put(); // for class B
A body which has three forces acting on it is in equilibrium. One force is 3N to the North and the other is 4N to the west. What us the magnitude and direction of the third force?
Webcam Driver static library or DLL required for Windows I want a .dll or .lib file using which i will take a snapshot from the webcam and it can't turn on the webcam LED while
Is it possible to pass an entire structure to functions? Yes, it's possible to pass an entire structure to a function in a call by method style. Some programmers prefer to decl
write a program that counts the number of occurances of the string in the n-th padovan string p(n)
Of course it is C[i] = A[i] + B[i].It was a typing mistake,never mind. You just understand the concept. 27-1 b. for grain-size=1 n=A.length grain-size=1 r=n for
After p = new Fred[n], how does the compiler know about n objects to be destructed throughout delete[] p? A: The run-time system hold the number of objects, n, somewhere where
C Program for MAXIMUM NO, MINIMUM NO AND SORTING void main() { int i,j,t; int a[5]; clrscr(); for(i=0;i
write c++ program to decode the given code. in mobile keypad the integers from 1 to 9 will display the characters from a to z and 0 will assign a space
#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string
A: auto: the default. Variables are created and initialized automatically while they are defined and destroyed at the ending of the block containing their definition. They are not
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd