V
Vincent Berkeley
Is there a way to allocate memory for a character array without knowing in
advance what size you need? For instance, is there a way to allocate memory
based on the length of an input string after the fact? This is a point of
some confusion for me, and I don't want to go around creating arrays large
enough to cover any contingency. Is there some malloc trick I'm missing?
Pardon my newbieness.
advance what size you need? For instance, is there a way to allocate memory
based on the length of an input string after the fact? This is a point of
some confusion for me, and I don't want to go around creating arrays large
enough to cover any contingency. Is there some malloc trick I'm missing?
Pardon my newbieness.