Hello all. Our tutor has asked us to multiplying two 2 digit numbers together, but they must first be placed into a string and it is the strings that must be multiplied together. The result is then to be displayed in reverse. I am very new to strings in C++ (as simple as they might be) and I cannot find out how to complete this task after nearly two hours of searching online now. Thank you in advance for any help given.
The bits have placed in italics cannot be removed (but can possibly be modified) as they are needed for this task or the next our tutor will give us.
Well, you can't simply convert back to integer, multiply, and convert to string yet again? Otherwise, there is no true "multiplication" of two string values unless you want to do some rather ugly stuff in binary. And if your teacher demands that you head in the binary route, you can simply look at ]http://en.wikipedia.org/wiki/Binary_multiplier to know how to multiply in binary. As you can see, it is a simple batch of shifts, and if-else statements. Converting back to decimal is as simple as a quick google search.