Constrcutor:Bhagalpur SIr
4 posters
Page 1 of 1
Constrcutor:Bhagalpur SIr
If there is class
class ABC
{
public:
{
ABC(ABC x)
{
}
}
Is there a problem in this code??
give reason
class ABC
{
public:
{
ABC(ABC x)
{
}
}
Is there a problem in this code??
give reason
ballu- Posts : 58
Join date : 2009-02-01
Re: Constrcutor:Bhagalpur SIr
- Argument of copy constructor should be a reference/pointer
- A default constructor has to be created explicitly by the user because we have created a copy constructor
- The parentheses after the public: access specifier have to be removed.
ramthegreatcv- Posts : 55
Join date : 2009-01-30
Age : 35
Re: Constrcutor:Bhagalpur SIr
kaunsi condition par fail ki baat kar rahe ho????
1st condition fails because this cause the constructor to call recursively
1st condition fails because this cause the constructor to call recursively
mnnit.rahul- Posts : 51
Join date : 2009-02-01
@ballu
etawah is right..it's calling the constructor recursively so it's fail......
shivang- Posts : 42
Join date : 2009-01-30
Age : 35
Similar topics
» REVRSE:Bhagalpur Sir
» Sizeof :bhagalpur Sir
» Design a datastructure - Bhagalpur SIr
» RAND5 to RAND7 : Bhagalpur SIr
» FIBONACCI recursion modified:Bhagalpur Sir
» Sizeof :bhagalpur Sir
» Design a datastructure - Bhagalpur SIr
» RAND5 to RAND7 : Bhagalpur SIr
» FIBONACCI recursion modified:Bhagalpur Sir
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|