I'm trying to build a program where the user inputs a string that has an int, and a char.
I'm trying to store the int in a register given by the char but I have no idea how to do this.
I separated the string input into a vector<string> so I can use each word separately but I'm not sure what to do next.
Ex.
> 3 a
3 has been stored in register a.
Thanks for any help and sorry for the confusing question!
Just kidding. What exactly do you mean by register?
That normally means an internal piece of the CPU where data is processed at the lowest level. Is there a "register" class you have written, or are you referring to some other storage device / concept?
vector<string> s;
s[0][1] //the second character of the first string in this construct. Is this what you need?