c++ program to check if two words are anagrams