A
Allen
Hi all,
I want to make a buffer of structs but I don't want to have a static
size; I want it to be as dynamic as possible. Ordinarily, I would use a
list, but in this case I really want to avoid that. Right now, I'm thinking
something along the lines of:
MyStruct mystruct[1];
mystruct = (MyStruct*)LocalAlloc(sizeof(MyStruct)*MAX_BUF); //MS-specific
I know, sorry
But this still limits me to MAX_BUF items in the buffer at once. I was
also thinking about some kind of conditional re-sizing scheme but couldn't
think of a non-messy or fast enough solution along those lines.
Anyone have any suggestions?
--
Best wishes,
Allen
No SPAM in my email !!
I want to make a buffer of structs but I don't want to have a static
size; I want it to be as dynamic as possible. Ordinarily, I would use a
list, but in this case I really want to avoid that. Right now, I'm thinking
something along the lines of:
MyStruct mystruct[1];
mystruct = (MyStruct*)LocalAlloc(sizeof(MyStruct)*MAX_BUF); //MS-specific
I know, sorry
But this still limits me to MAX_BUF items in the buffer at once. I was
also thinking about some kind of conditional re-sizing scheme but couldn't
think of a non-messy or fast enough solution along those lines.
Anyone have any suggestions?
--
Best wishes,
Allen
No SPAM in my email !!