#include <fstream>
#include <iostream>
#include <stdlib.h>
using namespace std;
void main()
{
FILE *pt;
if((pt=fopen( "d:\\test.txt ", "a+ "))==NULL)
{
cout << "erro " <<endl;
}
char ch;
while((ch=fgetc(pt))!=EOF)
{
cout <<ch;
}
fclose(pt);
getchar();
}