Thread: Reading 2d arrays from file?

  1. #1

    Reading 2d arrays from file?

    How do I read 2d arrays from files? I need to write a function that will read 2d arrays from a file and determine whether the array is symmetric, upper triangle or diagonal..How can I start

    symmetric meaning [i,j]=[j,i]
    upper triangle meaning if i>j and [i,j]==0
    diagonal meaning i<j and [i,j]==0

  2. #2
    Registered User
    Join Date
    Dec 2001
    I need to write a function that...

    so, it's homework then!!!

    do it yourself.. and when you have trouble, ask SPECIFIC questions.


    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  3. #3


    I have done it myself and made the functions. I just can't get the program to read the 2d array from the file correctly...

  4. #4
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    well we are not mind readers..... how can we help you fix your code if we cannot see it ??

    If you want help then help us a little.
    Read the thread entitled homework.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :-

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. File I/O with 2D arrays
    By hypertension in forum C Programming
    Replies: 2
    Last Post: 02-04-2003, 08:47 AM