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{
If you are eliminating duplicates from the entire file then the following code will do this. If you only intend to remove duplicates from each line then you will need to use a local variable to ::readline and pass this through as a reference to ::isduplicate, then at the end of ::readline append the contents to m_result.