Original Post
HI, I''ve decided that OO would be neat to know. Been using C/C++ for a while and I thought I would have a go at OO(have a Java class in school
). Though about doing a list implementation and I started thinking about a fast implementation, now just making a linked list makes it _very_ easy to append elements to it but well traversing it is _slow_... How about an array? Sure fast access but what if theres not enough space for a realloc? Move the entire list doesnt sound that tempting... So this is what i figured would be neat I just make an array of pointers to each object in the list sure i have to use realloc if the index doesnt fit but thats at least better than moving a list of perhaps int[100]. This seems to be the best way to do it altho if im making a list of chars i would prolly be better off with just an array since they are smaller than a pointer but this scales better with larger structures, should provide somewhat fast access and adding elements. The reason i posted(yes I actually had one
) is that im wondering if anyone could figure out a better way of doing this perhaps this is an extremly crappy way or something, any suggestions/ideas would be greatly appriciated
- Damage Inc.