Hallo, Ian Smith-Heisters hat gesagt: // Ian Smith-Heisters wrote:
Yes, that's my secondary solution, and actually what I ended up doing for the time being. It seems inefficient to me, however, to have a bunch of arrays sitting around that I'm not using entirely. While I won't run into a problem right away with a gig of memory, it won't be too long with such an inefficient model. However, this may be more efficient than trying to resize them on the fly. I'm always looking for the "right" or "elegant" way to do things in programming, but sometimes the way that works is elegant because it works at all.
In his keynote at Graz Miller at one point said - and quite impressed me with it -, that for a certain problem related to data structures, he already could think of a lot of *intelligent* solutions, but that he hadn't yet found a *stupid* solution, and thus didn't implement any solution yet.
I doubt that keeping track of the length qualifies as a "stupid" solution, but it is stupider than the intelligent solution which would be to wait for array resizing to finally work flawlessly. ;)
Frank Barknecht _ ______footils.org__
_ __latest track: fqdn _ http://footils.org/cms/show/38