LHernandez
October 31st, 2002, 06:51 PM
Please HELP:
This is the declaration of a function that adds together two unsigned integer numbers represented as strings:
void Add(const char * s1, const char * s2, char * result);
The function returns the result in a caller-supplied buffer
assuming that it is always big enough.
E.g. char result[50];
Add(“1273”, “16”, result);
Will return “1289” in the result buffer.
How can I write an implementation of the function in C++ w/o
using atoi(), itoa() or other standard functions for conversion.
This is the declaration of a function that adds together two unsigned integer numbers represented as strings:
void Add(const char * s1, const char * s2, char * result);
The function returns the result in a caller-supplied buffer
assuming that it is always big enough.
E.g. char result[50];
Add(“1273”, “16”, result);
Will return “1289” in the result buffer.
How can I write an implementation of the function in C++ w/o
using atoi(), itoa() or other standard functions for conversion.