C++ Program to Read and Show the Contents of a Text File

C++ Program to Read and Show the Contents of a Text File




 

#include<fstream.h>
void read()
{
ifstream f1(“File.txt”,ios::in);
char ch;
while(f1)
{
f1.get(ch);
cout<<ch;
}

}
void main()
{
read();
}

Click here for more C++ Programs

info@C++

C++ (pronounced “cee plus plus”).C++ is a general-purpose,powerful programming language.C++ is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. C++ was Developed by Bjarne Stroustrup starting in 1979.C++ adds OOPS-object oriented features such as classes, and other enhancements to the C programming language.


Rate this post




Further Reading:
http://en.wikipedia.org/wiki/Program
http://en.wikipedia.org/wiki/Read
http://en.wikipedia.org/wiki/And
http://en.wikipedia.org/wiki/Show
http://en.wikipedia.org/wiki/Contents
http://en.wikipedia.org/wiki/Text

You read About:C++ Program to Read and Show the Contents of a Text File

Posted by: Prateek on October 6, 2011


Previous Post: « Next Post: »

© 2017 Trendfy. All rights reserved
Blog Managed by Prateek Jaiswal