There are 2 classes defined as below
public class A
{
class B b;
}
public class B
{
class A a;
}
compiler gives error. How to fix it?
Answer Posted / praveen
public class A
{
class B *b;
}
public class B
{
class A a;
}
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What are the two different types of polymorphism?
What are the data types in oop?
class type to basic type conversion
Why it is called runtime polymorphism?
How to hide the base class functionality in Inheritance?
What causes polymorphism?
What are the 5 oop principles?
What is encapsulation in oops?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
any one please tell me the purpose of operator overloading
to find out the minimum of two integer number of two different classes using friend function
What do you mean by abstraction?
Write a program to sort the number with different sorts in one program ??
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
#include