files in c++

Discussion in 'C Programming' started by prabuxx, Mar 26, 2008.

  1. prabuxx

    prabuxx Guest

    can u explain the features of files in c & c++
     
    prabuxx, Mar 26, 2008
    #1
    1. Advertising

  2. prabuxx

    santosh Guest

    prabuxx wrote:

    > 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.
     
    santosh, Mar 26, 2008
    #2
    1. Advertising

  3. prabuxx wrote:
    >
    > 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:>
     
    Kenneth Brody, Mar 26, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Hansen
    Replies:
    2
    Views:
    2,446
    Tom Hansen
    Nov 21, 2003
  2. Chad

    .vb files to .resx files

    Chad, Dec 17, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    320
  3. crazyprakash
    Replies:
    4
    Views:
    3,421
    adrian
    Oct 30, 2005
  4. Replies:
    4
    Views:
    984
    M.E.Farmer
    Feb 13, 2005
  5. Replies:
    3
    Views:
    1,518
    Rolf Magnus
    Jan 18, 2009
Loading...

Share This Page