I am making a caesar cipher and am trying to convert the char value of each letter into an int so the shift value can change it.
for (int i = 0; i < plainTextInput.Length; ++i)
{
chars[i] = ((int)chars[i]) + shiftAmount;
}
It says it cannot convert int into char. How do i fix this problem?
You have to explicitly cast it back:
However, you’re going to run into trouble pretty quickly once you shift past
z.