hello, can somebody help me in learning file i/o in c++?
i would be very grateful

Recommended Answers

All 3 Replies

The best thing to do is get a reference book, preferably hardcopy, though there are some online resources as well. In general you use filestream objects to read and write to files as opposed to an istream object (cin) and on ostream object(cout) to write to the screen. Once you get the syntax of declaring a filestream object and associating it with a given file then the syntax of using the filestream object is the same as using cin and cout. Each file is unique and unless you know how it is set up it can be difficult to read it efficiently. Learning about appending to vs overwriting of (truncating) as well as whether file was written in tex mode or binary and other modes of file association is important, too.

hello, can somebody help me in learning file i/o in c++?
i would be very grateful

just google it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.