Homework help decrypting

Hi, I need help with my coding and what is wrong with it. I am making a function where I have to read from a file called contents.txt and decipher the code a little. To decipher I have to eliminate all of the double characters and only make one, an example would be aaabbbyyy ---> aby . For some reason it is not couting the string deleted to the terminal, so I must have made a mistake I can't see. I am a beginner in C++, so can someone please help me step by step.

In the contents.txt file:
fousx.-..fpqefoub_bpq`foulropbffkeffpqlovsx
teihteilftt^kq^_rteioofqqlhl
tjctjcmujf`eefdd^ketjcll`hhbvltkpmu
wprezgwpr\\noamdwpr_\tiidbco6$f{
Please do not post more than once:
http://www.cplusplus.com/forum/general/117273/
Topic archived. No new replies allowed.