I have a long stream of numbers that I need to be able to input all at once (basically copy and paste) into an array somehow. I need to do this so I can make every pair of those numbers to correspond to a letter.
For example, I need to be able to type in 45323456 and have it come out "dove", so 45 = d, 32 = o, and so on. I was trying to just use a string and then use a "for" loop and a set of arrays to do this, but I'm just getting gibberish. I've got the comparison part pretty well worked out; I just can't figure out how to segment each set of two into an array for future comparison.
Any help would be much appreciated. Thank you.
int codearray[50];
char phrasearray[50];
string phrase;
int j;
cout << "Please input your code without spaces: ";
cin >> phrase;
int SizePhrase=phrase.size();
for(j=0; j<SizePhrase; ++j)
{
codearray[j] = phrase[j];
}