Thread: saveMatrix to a file

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    1

    saveMatrix to a file

    Using 2 functions int saveMatrix(matrix *m, char *n),
    int loadMatrix(matrix *m, char *n) in c programming

    These have to
    1. saveMatrix saves a matrix pointed at by matrix pointer m to a file whose name is
    held in a character array pointed at n char pointer n.
    2. loadMatrix loads a matrix from a file whose name is held in a character array
    pointed at n char pointer n and stores it in the matrix pointed at by matrix pointer m.

    Both functions should return a value 0 if the file was successfully written or read, and
    -1 if there was a write of read error (e.g. file not found for reading)

    The program should input a matrix from the keyboard into matrix m1.
    It then saves m1 to a file called mat1.txt.
    It reads the contents of mat1.txt into matrix m2.

    help needed asap think you.

  2. #2
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    while(1)fork();

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  4. 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
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM