I can't post my full code due to school policies, but the program's goal is to take in a file, search for exclamation marks and change them to periods. The punctuation marks are not necessarily at the end of every sentence, so you would then have to output the rest of the line which shouldn't be changed; however, the if statement simply does not execute even though cout << line.at(a) is outputting the exclamation mark.
I understand; however, it is like you go to a doctor with a high fever and cannot answer the questions to the nurse due to "privacy". It is hard to diagnose the problem without the code to know what is your though process. As Zhuge mentions, use the debugger in your compiler. It will show the values. Good luck.
I can't post my full code due to school policies, but the program's goal is to take in a file, search for exclamation marks and change them to periods.
What you can do is post a snippet of code that is fully compilable and reproduces the problem you're experiencing (perhaps in a different context than that specified by your homework requirements.)