So I have managed to get my program to tell me how many characters and how many lines are in the file, now I need it to tell me how many html comments are in the file. Html comments start with <!-- ", ends with " -->. Could anyone give me some tips on how to make the program recognise comments and count the amount.
I had an idea of doing it this way for example: if < is followed by - then - +1 for comments. If anyone would know a way of implementing that would be very helpful.