this is the code i've come up with so far. I figure i can make word equal to the line of the string its reading and loop through going word[i] printing all the chars to the outfile, then put an if statement saying if word[i] = '@' then reverse. Then when it gets to the end of the line go to the next and start all over.
using namespace std;
while(word[i] != '@')
tmp = rev.top();
outFile << tmp;
string inFileName = "reverse.in";
string outFileName = "reverse.out";