I'm trying to make a do while loop so if the user enters y or Y the program repeats from the begging but if the user enters anything else the program stops
while (repeatkey == 'y' || 'Y');
Whenever you have a non-boolean value in a statement that requires one (if, while, else-if, etc.), the value will be converted to a bool. A zero indicates false, otherwise it is true.
In this case, the character 'Y' is 89 in ASCII, and 89 is greater than 0. Thus resulting in the expression always executing. You have yourself an infinite loop.
To fix this, just dorepeatkey == 'y' || repeatkey == 'Y'.