Alternative to ifstream?

This is a discussion on Alternative to ifstream? within the C++ Programming forums, part of the General Programming Boards category; Hi, I've been making a modification for a game called Half-Life. Basically it produces a dll that alters how the ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    127

    Alternative to ifstream?

    Hi,

    I've been making a modification for a game called Half-Life. Basically it produces a dll that alters how the game runs. Anyway, my modification reads from some text files, and it does so by using ifstream. I think I heard that you shouldn't use ifstream, for some reason. Is this right? If so, what's the alternative? Or is it OK?

    Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,655
    Of course you can use fstream. What argument was given against it?

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    There's nothing wrong with ifstream that I've heard of.
    The alternatives would be the C functions: fopen(), fclose(), fread(), fwrite()... or calling OS specific functions directly, or using some third party functions like in Boost...
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple ifstream Question
    By Paul22000 in forum C++ Programming
    Replies: 8
    Last Post: 12-05-2008, 04:34 PM
  2. ifstream
    By Wraithan in forum Tech Board
    Replies: 3
    Last Post: 09-24-2006, 01:26 AM
  3. ASP.NET alternative to gallery.menalto.com ???
    By gicio in forum C# Programming
    Replies: 0
    Last Post: 05-15-2005, 11:31 AM
  4. ofstream and ifstream for searching and writing
    By johnnyd in forum C++ Programming
    Replies: 6
    Last Post: 03-17-2003, 07:34 AM
  5. Ifstream Problems
    By IlUomo in forum Windows Programming
    Replies: 1
    Last Post: 04-24-2002, 12:51 PM

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