Not a problem, ptext.eof() will only test if the file stream is EOF. you should store what ptext.peek() returns in a variable so you can use it for whatever purpose you want.
i'd imagine it looking somethign like this:
1 2 3 4 5 6 7 8 9
ifstream ptext ("test.txt");
char x;
while (true)
{
x=ptext.peek();
if (ptext.eof()) {cout << "end of file"; break;}
cout << x;
ptext.get(x);
}