Thread: LinkedList
View Single Post
Old 12-08-2008, 06:36 PM   #14
C2H3NaO2
User
 
Join Date: May 2008
Posts: 80

C2H3NaO2 is on a distinguished road (17)

Default

I like that thing! Is looks pretty clean and easy.
But there are a few things, that I would implement different.

I would put it all into a textmacro. This would give you (and other users you don't know) the ability to create different Lists with different types.
In most cases only having integer lists is enough, but sometimes you have to create a own structs only for storing a string or something like that.

In my opinion there also belongs pushfront, pushback, popfront and popback (yeah i like the c++ names) methods in the main list struct that ALWAYS works.

btw: In my opinion you should save the size in a integer in the struct List. It would be much faster.

P.s. Excuse my English; if I did some really BIG mistakes, please tell me. I try to correct my English skills.
C2H3NaO2 is offline   Reply With Quote