Thread: Technical filestream question.

  1. #1
    Registered User
    Join Date
    Sep 2004

    Technical filestream question.

    I've been using both c and c++ for some time but there is one thing that I really don't understand very well.
    It's the technical difference between FILE* and, let's say ifstream. I understand FILE* is a pointer and that ifstream is part of some class but I don't really understand what really happens in the different ways of working
    with files. If anyone could take some time and explain this I would be grateful.

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    FILE is C's struct implementation and ifstream is C++'s class. They both do pretty much the same thing, However, C++'s version of it is more enclosed or object oriented. Everything that has to do with file operations is managed in that class, nowhere else. Unlike C's implentation, fopen is in essence, a "global" function. The only difference is the conversion that took place to turn C's messy FILE, to C++'s ifstream.
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:

  3. #3
    Registered User
    Join Date
    Sep 2004
    Thanks, that makes it a little easier to understand.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Technical Specialist - Update Delivery - C Required
    By ISCRecruiter in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 07-21-2008, 09:50 AM
  3. Getting type
    By AngKar in forum C# Programming
    Replies: 3
    Last Post: 05-26-2006, 09:06 AM
  4. callbacks and threads - technical question
    By Jumper in forum Windows Programming
    Replies: 2
    Last Post: 07-11-2004, 12:09 AM
  5. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM