I have an input file that has data in for format:
1 asdfhboais
so its an integer followed by a group of characters. I need to figure out how many characters there are. Then access them one at a time to compare them. I tried to save them to a string and check, like so:
Code:
int number, len;
string letters;
cin >> number >> letters;
len = letters.length();
but I get a warning because the string.length() function returns an unsigned integer. I need to use the length later as an int. Is there a good way to do what I need. Thanks!