How can I make it so the user defines the size of the array?
Sponsor Sponsor
md
Posted: Fri Mar 17, 2006 11:13 am Post subject: (No subject)
you can do it rather easily with malloc/new (depending on C/C++). But seeing as dynamic memory allocation is usually not taught at all; or if it is not until the very end of the year I'm guessing this is one of those cases where you are given a maximum size of some kind. That was you can just declate the really big array and have another varaible to keep track of the upper bound.
wtd
Posted: Fri Mar 17, 2006 11:28 am Post subject: (No subject)