// filing.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<fstream>
#include<string>
#include<iostream>
using namespace std;
int main(){
ifstream is;//made an object of input file stream to read from file using array
char character[100];
is.open("ReadMe.txt");
is.getline(character,100,'\n');
while(!is.eof() && !is.fail()){
cout<<character;
is.getline(character,100,'\n');
}
is.close();
cout<<endl;
return 0;
}
//
#include "stdafx.h"
#include<fstream>
#include<string>
#include<iostream>
using namespace std;
int main(){
ifstream is;//made an object of input file stream to read from file using array
char character[100];
is.open("ReadMe.txt");
is.getline(character,100,'\n');
while(!is.eof() && !is.fail()){
cout<<character;
is.getline(character,100,'\n');
}
is.close();
cout<<endl;
return 0;
}
No comments:
Post a Comment