Thread: Alternative to ifstream?

  1. #1
    Registered User
    Join Date
    Sep 2007

    Alternative to ifstream?


    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?


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

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Toronto, ON
    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, 05: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 ???
    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, 08:34 AM
  5. Ifstream Problems
    By IlUomo in forum Windows Programming
    Replies: 1
    Last Post: 04-24-2002, 12:51 PM