--- In [email protected], "Tamas Marki" <[EMAIL PROTECTED]> wrote: > > On 5/23/07, amee_ahmd <[EMAIL PROTECTED]> wrote: > > I have 2 do a project to handle the big mathematical > > problem.The problem is that i have 2 store two numbers > > whoes digits can be of 0 to 200 now the problem is that > > where i can store them plz any body who know this help > > me.I m 2 mch worried becoz of this problem.Thanks > > Please don't use SMS lingo, this is e-mail and it's nicer > not to rape the language when you don't have to. > You could use a linked list or a vector to store each digit > in the numbers, then implement the operators you need to > work on those.
Or simply use a large array (e.g. int[500]) to store the numbers. This of course still requires you to program the operators on those arrays, but as of my experience this will be easier to do with arrays than with linked lists or other variable-size containers. Another approach -if you feel confident with dynamic memory management- is to allocate those arrays dynamically (using malloc() or new, depending on the language) and to resize (resp. re-allocate in C++) them if necessary; this means you have a somewhat more complex memory management but still can use arrays to implement all needed operators. Regards, Nico
