Thread: checking x size of multi 2-d array

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    28

    checking x size of multi 2-d array

    I am passing a multi-2d array through a routine, and this routine is used several times with different x sized 2-d arrays.
    NOTE: The y coordinate is always 15.

    Is there a way to extract the size of the x coordinate of the passed array?

    For example, can you get the size of x in scan_list[x][15], as shown below within the routine?

    Code:
    byte check_for_duplicate_codes( byte *scan, byte scan_list[][15] )
    {
    
     ...
    
     // I want to use the size of x in scan_list[x][15] in here.
    
    }

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    No you'll need to pass it as another parameter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Little Array Difficulty
    By G4B3 in forum C Programming
    Replies: 16
    Last Post: 03-19-2008, 12:59 AM
  2. Invalid conversion from 'void*' to 'BYTE' help
    By bikr692002 in forum C++ Programming
    Replies: 9
    Last Post: 02-22-2006, 11:27 AM
  3. Array size
    By tigrfire in forum C Programming
    Replies: 5
    Last Post: 11-14-2005, 08:45 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. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM