Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,843 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,356 people online right now. Registration is fast and FREE... Join Now!




trying to read-in and output the contents of a file

 
Closed TopicStart new topic

trying to read-in and output the contents of a file

Phantom_of_the_opera
7 Feb, 2007 - 12:01 PM
Post #1

New D.I.C Head
*

Joined: 13 Nov, 2006
Posts: 43


My Contributions
-

This post has been edited by Phantom_of_the_opera: 3 May, 2007 - 10:46 AM
User is offlineProfile CardPM
+Quote Post

horace
RE: Trying To Read-in And Output The Contents Of A File
7 Feb, 2007 - 12:31 PM
Post #2

D.I.C Addict
Group Icon

Joined: 25 Oct, 2006
Posts: 573



Thanked: 5 times
Dream Kudos: 50
My Contributions
QUOTE(Phantom_of_the_opera @ 7 Feb, 2007 - 08:01 PM) *

Ok I'm trying to read in a file and output its contents so I'm using the library <fstream> and declaring it, and using the ifstream inFile();
but how do I output the contents of the file? I tried declaring some variables but it didn't work... can somebody help me?

Thanks

Shayne

have a look at this tutorial on file I/O
http://www.cplusplus.com/doc/tutorial/files.html
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 1/8/09 10:10AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month