Thread: Multidimensional array: read errors?

  1. #1
    Registered User
    Join Date
    May 2004

    Multidimensional array: read errors?

    Am using Metrowerks CodeWarrior, and I am working with a two-dimensional dynamic array.

    Sometimes the nested loop

    doesn't quite behave as it should. After significant debugging, I have found that it doesn't always retrieve the array value it's supposed to. For example, when i=4, j=0, it retrieves array[0][0] instead of array[4][0].

    Does anyone know how this might be fixed?

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Seattle, WA
    That sounds suspicious...Does it only happen with dynamic arrays? Maybe you could post a short example program that we can compile.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."

  3. #3
    Registered User
    Join Date
    Nov 2001
    Post the declaration of do_something_to(...).


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 05-29-2009, 05:48 AM
  2. Multidimensional Array in a Structure
    By Night_Blade in forum C Programming
    Replies: 3
    Last Post: 04-04-2005, 08:14 PM
  3. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM
  4. Replies: 1
    Last Post: 03-30-2004, 02:57 PM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM