Thread: help !!!

  1. #1
    Unregistered
    Guest

    help !!!

    Ok heres the deal yes this homework and no im not looking for someone to do this for me
    I need to use dynamic allocation to create an array of just the right size using malloc. since i need to know the size of the file i need to use either stat or fstat . the file must be read in binary mode using file descriptors. my problem is i dont even know where to begin if anyone could help me get started or give me a nudge in the right direction i would appreciate it greatly

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > the file must be read in binary mode using file descriptors

    Use the board search - this has been covered quite a bit.

    > malloc

    malloc prototype:
    void *malloc(size_t size)

    It's in stdlib.h

    ::Nudge::

Popular pages Recent additions subscribe to a feed