okay, hopefully this will be my last post .. I got it to work the way I wanted but one last thing. I need to edit the file I am writing to right after I write to it.
I tried this new code jsut to test to see if it works, but it says it won't read from the file.
Here is the code:
Code:
#include <iostream>
#include <fstream>
using namespace std;
ifstream infile;
ofstream outfile;

int main()
{
char tok;
infile.open("infix.dat");
outfile.open("infix2.dat");
infile.get(tok);
while(!infile.eof())
{
   outfile<<tok;
   if(tok=='\n')
   {
     outfile << '$';
   }
infile.get(tok);
}

infile.open("infix2.dat");
if(infile.fail())
{cout << "error";
return false;}
else
cout << "Please work"<<endl;
return 0;
}