Thread: pass the pointer of a two dimension array to a function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    30

    pass the pointer of a two dimension array to a function

    Hi all,

    how to pass the pointer of a two dimension array to a function?

    Is it something like
    Code:
    int array[10][5];
    func( &array[0][0] );
    ...
    ...
    void func( int[][] *array ) {
        ...
    }
    Is the code void func( int[][] *array ) correct?
    Last edited by SoFarAway; 04-12-2005 at 06:56 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  2. Passing a pointer to two-dimension array in a function
    By E_I_S in forum C++ Programming
    Replies: 11
    Last Post: 06-19-2008, 09:57 AM
  3. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM