#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string>
using namespace std;
int main()
{
ifstream infile;
infile.open ("tsest.txt", ifstream::in);
if(!infile)
{
cout << "wrong filename" << endl;
system( "PAUSE" );
return 0;
}
char result[500];
while(infile.getline(result,500))
{
cout << result << endl;
}
system( "PAUSE" );
return 0;
}
#include <fstream>
#include <stdlib.h>
#include <string>
using namespace std;
int main()
{
ifstream infile;
infile.open ("tsest.txt", ifstream::in);
if(!infile)
{
cout << "wrong filename" << endl;
system( "PAUSE" );
return 0;
}
char result[500];
while(infile.getline(result,500))
{
cout << result << endl;
}
system( "PAUSE" );
return 0;
}