And I want to get the 5 part. I want to be able to do something like i[1], is there a way to do this in C++? Also, would there be a way to do this with a string?
You can do that with a string, because string is an array of characters.
You can't do it with an integer that simply, because it is not an array of digits. To get a digit, you'll have to play around with /10 and %10.