A
aegis
I've seen code for linked list implementations where the
Node class has a data member for some type
in addition to a pointer to another Node. The
issue? The "some type" is, from what I have seen,
never a pointer to "some type", hence you would
have to have a default constructor for the
"some type". But what about a case where
a default constructor might not be ideal?
It would seem more sensible to me to have
the data member of the Node class, to be
a pointer to "some type". Thoughts?
Node class has a data member for some type
in addition to a pointer to another Node. The
issue? The "some type" is, from what I have seen,
never a pointer to "some type", hence you would
have to have a default constructor for the
"some type". But what about a case where
a default constructor might not be ideal?
It would seem more sensible to me to have
the data member of the Node class, to be
a pointer to "some type". Thoughts?