S
S
Sergey Sokolov2014-03-26 23:26:15
C++ / C#
Sergey Sokolov, 2014-03-26 23:26:15

How to fix problem in 2D dynamic array?

There is a dynamic array. And, apparently, there are some problems during initialization, the debugger suggested that the program is accessing memory that does not belong to it.
When the program is executed, the following thing happens: let's say size = 3, then when reading the array elements, only three pieces are read instead of nine.
Here's the code : pastebin.com/WgAFnM4Z
The conditions don't allow using vector, and I don't want to use a constant array size, so as not to get confused with pointers in functions. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vans239, 2014-03-26
@freaks

Read carefully line 70. These things need to be dealt with!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question