Technical filestream question.

This is a discussion on Technical filestream question. within the C++ Programming forums, part of the General Programming Boards category; I've been using both c and c++ for some time but there is one thing that I really don't understand ...

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    80

    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
    Posts
    215
    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:
    sadf 

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    80
    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, 01:14 PM
  2. Technical Specialist - Update Delivery - C Required
    By ISCRecruiter in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 07-21-2008, 10:50 AM
  3. Getting type
    By AngKar in forum C# Programming
    Replies: 3
    Last Post: 05-26-2006, 10:06 AM
  4. callbacks and threads - technical question
    By Jumper in forum Windows Programming
    Replies: 2
    Last Post: 07-11-2004, 01:09 AM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21