![]() |
|
#1
|
|||
|
|||
Dynamic 2d Array ProblemsOk, what I'm trying to do is create a 2d array that has a user-specified size.
CPP / C++ / C Code:
Now, this works with a width of 12 and a height of 12 or 24 and 80 or other sizes, but if I put in width: 13 and height: 12, it gives me an assert error... why? |
|
#2
|
|||
|
|||
|
Quote:
You are allocating mazeHeight thingies in the first for loop. You are deleting mazeWidth thingies in the second for loop. By the way, i is not defined in the second loop. Regards, Dave |
|
#3
|
|||
|
|||
|
Hehe, erm... oops is all I have to say... thanks.
|
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Speed up C++ code about 3d array! | Truong Son | C++ Forum | 0 | 16-Mar-2004 21:52 |
| 3D array dynamic memory allocation | cjwatchdog | C Programming Language | 3 | 20-Feb-2004 15:27 |
| c: array comparison | jack | C Programming Language | 7 | 26-Jan-2004 11:21 |
| Extra null element in an array | samtediou | MySQL / PHP Forum | 2 | 11-Dec-2003 11:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The