Thread: Mutidimensional Array problem

  1. #16
    Registered User
    Join Date
    Aug 2006
    Posts
    64
    not currently at my workstation right now, but I'm curious to why nstep would be so huge... nstep has been predetermined and *times has allocated enough memories for maxstep double (which supposedly is equal to nstep)?

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    Well one of several things could be happening
    - something is trashing the 'times' pointer itself, so when you try and index through it with an in-range value, you still lose.
    - you didn't allocate anything in the first place (no NULL check, though that seems unlikely)
    - you didn't allocate enough space, though you do have the right 'sizeof(type)' in there.

    Like I said, you need to debug it yourself.
    Or at least show us the results of what you've managed to figure out.

    Even supplying your input data would help those who actually have the gsl library installed to at least try your code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Array problem
    By TomBoyRacer in forum C++ Programming
    Replies: 3
    Last Post: 04-08-2007, 11:35 AM
  2. Replies: 6
    Last Post: 02-15-2005, 11:20 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Need desperate help with two dimensional array problem
    By webvigator2k in forum C++ Programming
    Replies: 4
    Last Post: 05-10-2003, 02:28 PM
  5. From stream/file to a string array problem
    By dradsws in forum C Programming
    Replies: 2
    Last Post: 10-01-2001, 06:24 PM