Hi Friends ! You are on HR Developers website. Here you can find the codes of different languages like c ,c++ , java, pyton and many other languages.
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream obj;
string line;
obj.open("ofstreamExample.txt");
if(!obj)
cout<<"file does not exist:"<<endl;
}
while(getline(obj,line))
cout<<line<<endl;
obj.close();
No comments:
Post a Comment