I have a project that is this
Project:

For this project you will write a program that will read in strings from a file named "reverse.in". Each word may be marked with an even number of "at" characters ('@'). The first '@' character signals that the following characters up to the next '@' are in reverse order. Your program will print the result to an output file called "reverse.out". You must use an STL stack to reverse the order of the characters.

For example, if the input file looks like this:

@egelloC@
CS174
re@srev@e
sup@ilacre@fragilist@ilaipxeci@docious
id@@en@@ti@@ty

then the output would be:

College
CS174
reverse
supercalifragilisticexpialidocious
identity
i can't think of how to independently access the chars to reverse them. My idea as of so far is to have an if statement that will check to see if the char is equal to the @ sign, then it will copy all the chars into a temporary array or something, then when it reaches the second @ sign it will stop copying the chars, then what i can't think of how to do is to put the chars back into the sting, i would just do a reverse loop to make the chars print out backwards but those are my ideas. I have a feeling it would be completely wrong and idk how to deal with the problem where there are @@. any help would be greatful. Thanks in advance.