I'm try to code a program that will detect if two strings are anagrams while disregarding the spaces and capitalization of the input. Its also supposed to give the user a choice whether they want to continue or not. It works fine for the first try but when I select 'y' to repeat the program it goes straight to asking for the second string.
Pls help me. Im a beginner to coding so I don't know much yet
here is the link to my code:
You have the same problem as this. Check the Mixed Input Methods section of my answer there.
TL;DR; Do not mix getline() with other methods that read from the stdin.