If you are working in C++, stl has a vector container class which will do this. Otherwise, declare an integer pointer in the struct and use malloc to allocate memory for it. Then you can use it like an array. Don
On Aug 23, 11:51 pm, Arun Vishwanathan <[email protected]> wrote: > say that you have a structure with some fields of known size and unknown > size.For example, a char, an integer and an integer array.I do not know the > size of the integer array until the user mentions the number of bytes he > needs this integer array to cover in the command line as an argument.Is it > possible to have a structure with an integer dynamic array? > > Arun > > -- > "People often say that motivation doesn't last. Well, neither does bathing > - that's why we recommend it daily." -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
