2-dimension arrays from a file

This is a discussion on 2-dimension arrays from a file within the C++ Programming forums, part of the General Programming Boards category; Hi, I'd like to read a 30 x 6 array from a text file (much like the one attached) into ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    3

    2-dimension arrays from a file

    Hi, I'd like to read a 30 x 6 array from a text file (much like the one attached) into my program so that I can output it to the screen. I've tried doing this a number of different ways but have not been successful, so what is the best way to go about doing this?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,663
    Perhaps you should post both your input file and your best attempt at solving the problem.
    A board search would be a good idea as well
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM

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