So, I've been doing some of the problems on Project Euler for a while and it seems a few of them require the manipulation of very large numbers so I decided to start building a large integer class. For now I will just stick to additive operations using positive numbers (addition/multiplication) and later extend it to subtraction and division.
The number is stored dynamically in an unsigned short array on the heap and so far I have written just the constructors/destructor, assignment and extraction overloads. It mostly seems to be working at the moment but I'm still learning about most of this stuff, so I would be really grateful if anyone could point out any poor code practises or suggestions to improve the memory efficiency etc.
One thing I have never used before is exception handling, I have tried to implement some here by having a function, checkformat(). If any element in the array is outside the range 0<x<9, an exception is thrown which is caught and passed as an argument to another function, err_handle() which lets the user know what the error was. Is this an okay use of the try{} catch{} blocks?
Sorry, i may not have been clear in the explanation. the large integer is stored as a 1D array such that, say, a 100 digit number is represented by the variable number_[100], where each element represents a digit from 0 to 9, each digit is an unsigned short type and the total number of digits is an unsigned int.