OK, I hope I explain this one correctly. I have a struct:
typedef struct _MyData
{
char Data[256];
int Index;
} MyData;
Now, I run into a problem. Most of the time MyData.Data is OK with 256, but in some cases I need to expand the amount of chars it can hold to different sizes. I can't use a pointer. Is there any way to resize Data at run time? How? Code is appreciated.
Thanks
EDIT:
While I am very thankful for all the comments, the "maybe try this..." or "do that", or "what you are dong is wrong..." comments are not helping. code is the help here. PLease if you know the answer post the code.
and:
1- cannot use pointers. please don't try to figure out why, i just can't 2- the struct is being injected into another program's memory. that's why. no pointers.
sorry for being a bit rough here but i asked the question here because I already tried all the different approaches that thought might work. Again, i am looking for code. At this point I am not interested in "might work..." or " have you considered this..."
thank you and my apologies again
EDIT 2
Why was this set as answered?