CF> char array[2][10];
CF> cout << "Enter array 1: ";
CF> cin >> array[1];
CF> cout << "Enter array 2: ";
CF> cin >> array[2];
You meant to input into array[0] and array[1], didn't you? :)
C++ uses 0-based arrays. This is a classic off-by-one error.
It is one of the standard roots on the path, over which we
trip and bump ourselves, earning merit badges which look
suspiciously like keyboard-shaped bruises on our foreheads.
If you look, nearly everyone has such a merit badge.
> ] I am Solo of Borg, and I've got a bad feeling about this....
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|