Thread: Passing point to array[][] to a function

  1. #1
    Registered User gazsux's Avatar
    Join Date
    Mar 2002

    Passing pointer to array[][] to a function

    I have a 2d array bZBuffer[][] and i want to pass a pointer to this array to a function but i cant figure out how. I know its easy, just one of those days. In fact I looked it up in a book and their version doesn't work

    this is what i have at the mo

    function prototype:
    void Rasterise(int iObjectCount, Buffer ***bZBuffer);
    Rasterise(iCountO, &bZBuffer);
    I know its basic error, cheers for any help
    Last edited by gazsux; 04-22-2003 at 03:31 PM.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Would this help?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User
    Join Date
    Apr 2003
    How would you pass a 2d string array "Pointer" which contains a list of names to a function? What would be the syntax to Define the Array in the Main module/program, and then to Declare and to Call the function? Thanks!

    This question is in reference to my earlier problem, because I have very little experience with this code situation.
    Last edited by FYX193; 04-28-2003 at 03:25 PM.

  4. #4
    Registered User
    Join Date
    Apr 2003
    Well, thanks for the input... I'll try to remember it for next time. I just opted for global variables in my situation to make things simple. I'll try what you said on my code to see if that fixes it. Thanks Again!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  2. Compiler "Warnings"
    By Jeremy G in forum A Brief History of
    Replies: 24
    Last Post: 04-24-2005, 01:09 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Passing my array to function
    By pooty tang in forum C Programming
    Replies: 8
    Last Post: 09-15-2004, 12:19 PM
  5. Replies: 1
    Last Post: 05-28-2002, 11:20 AM