Wednesday, October 19, 2011

Program:To read data from the file




File handling in c++
CODE:

#include<iostream.h>
#include<conio.h>
#include<fstream.h>
Void main()
{
char info[20];
ifstream obj1;
obj1.open("hello.txt");
obj1>>info;
cout<<info;
obj1.close();
getch();
}

Article by
Chief-Editor

He is a tech Enthusiast, an Altruist and calm mentor. He loves to code. He is also a creative graphic designer. Do check out his designfolio @ Jasmeet.asia If you like This post, you can follow me on Twitter.



For Further Reading,
C++ Program

0 comments:

Post a Comment