files in c++

S

santosh

prabuxx said:
can u explain the features of files in c & c++

As it pertains to C, a file is usually a named entity that is connected
to a stream by the use of fopen(), and used to exchange data with the
program's environment. It can also be renamed with rename() and removed
with remove() functions. C defines two types of streams and hence
files: text and binary. A text stream is composed of one or more lines
with each line terminated, as far as C is concerned, with a newline
('\n') character, while a binary stream is merely a sequence of bytes,
with the system doing no special interpretation. When your program
starts-up three predefined file streams are already openend by the
system, viz., stdin, stdout and stderr, which may be connected to
either disk files or other I/O devices.

As you can see, the C concept of "file" is not quite what most people
think of as files (i.e, disk files). A C file is a named entity with
which to read and write data to the program's environment, and managed
with an associated stream.

I believe the essentials of this concept are true for C++ too, though
the API is markedly different and wrapped as objects.
 
K

Kenneth Brody

prabuxx said:
can u explain the features of files in c & c++

Mr. Thant no longer reads clc.

What information, specifically, are you looking for?

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top