Thread: from file to arrays

  1. #1
    Registered User
    Join Date
    Dec 2017

    Red face from file to arrays

    Hi everyone ,, i hope u r fine !!

    i have question says
    : from file to arrays-15121616111-png

    Should i convert from file to arrays ?

    if(answer == yes );

  2. #2
    Join Date
    Aug 2017
    I off the top of my head, I could say no. Using rewind or fseek to reset your stream. and maybe toss in ftell and other helpers to search the file to see if their is a match could be used instead of putting everything into an array first then looking in the array.

  3. #3
    Registered User
    Join Date
    May 2010
    Should i convert from file to arrays ?
    Unless your file is extremely large yes. Trying to search through a text file is very very slow and trying to use seek() or any of the other file positioning mechanisms are not too reliable when dealing with text files.

    But if you do use arrays, you should be using an array of a structure not parallel arrays.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File I/O and Arrays
    By John Gaden in forum C++ Programming
    Replies: 6
    Last Post: 08-15-2008, 02:46 PM
  2. File I/O with arrays
    By 20,000leeks in forum C++ Programming
    Replies: 32
    Last Post: 09-18-2006, 02:16 AM
  3. Arrays and File I/O
    By Darklighter in forum C++ Programming
    Replies: 3
    Last Post: 02-11-2006, 08:40 PM
  4. File I/O with 2D arrays
    By hypertension in forum C Programming
    Replies: 2
    Last Post: 02-04-2003, 08:47 AM
  5. Arrays from a file
    By frenchfry164 in forum C++ Programming
    Replies: 3
    Last Post: 02-02-2002, 11:54 AM

Tags for this Thread