Question: C++ add(char* num1, char* num2, int base) I need a function that adds two dynamic arrays using pointers and walkers. - don't convert to integer.
C++ add(char* num1, char* num2, int base)
I need a function that adds two dynamic arrays using pointers and walkers.
- don't convert to integer. Instead subtract '0' to grab the number.
- Make sure to pad with zeros if one array is shorter than the other.
Use ONLY the pointer notation:
don't use [ ] operator.
don't use *(p + i) notation.
use if you need to access a cell in the array, get a walker and point to the cell you want to access
you may use walker = walker + 1 or walker = walker+i
- don't forget to delete dynamic memory and add null to your array.
IF You have any questions please comment and I'll clear things up. please include main. thumbs up if provide something helpful. Base is used to carry numbers when adding together. In this case we are using base 10.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
