In case your input file contains the '-' and '>' characters, they will also be omitted from reading along with the '->' symbol. I have given you an idea of how to do the skipping of characters, you should take care of the case that I mentioned here while omitting the characters.