c++ - FIFO implementation -
When I applied a FIFO, I used the following structure: struct node { T info_; Node * link_; Node (t information, node * link = 0): info_ (info), link_ (link) {}}; I think that this is a famous move for a lot of STL containers (for example, for the list). Is this a good practice? What does this mean for the compiler when you say that the node has a type of pointer? Is this an eternal loop? And finally, if this is a bad practice, then how can I apply a better FIFA? EDIT: People, this is all about non-affiliation. I am quite familiar with the STL library, and have discovered many containers from many libraries. I just want to discuss with those people who can do good implementation or good advice. The manner in which it is being declared is correct in both C and C ++. This is based on the fact that the pointers are fixed size objects (say, 32-bit integers on 32-bit platforms) so that you do not need full type of type-to-type to be known. Basically, you do not need to ...