A
ashok
A class can contain the pointer to object of that class as one of its
members.
Its understood. That's why linked lists are possible.
But I couldn't understand why
A class allows a static instance of an object of that class as its own
members but doesn't allow an ordinary variable object of that class
as its own members.
like
class one
{
one *o1 //ok..That's why linked lists are possible.
static one o2 //Ok
one o3 //error
.....
.....
};
If it doesn't allow o3 to be its own member then why it allows o2?
regards,
arj
members.
Its understood. That's why linked lists are possible.
But I couldn't understand why
A class allows a static instance of an object of that class as its own
members but doesn't allow an ordinary variable object of that class
as its own members.
like
class one
{
one *o1 //ok..That's why linked lists are possible.
static one o2 //Ok
one o3 //error
.....
.....
};
If it doesn't allow o3 to be its own member then why it allows o2?
regards,
arj