Home > Back-end >  New out of the two dimensional array with auto local types of two dimensional array different? Why t
New out of the two dimensional array with auto local types of two dimensional array different? Why t

Time:09-26

Soon learn c + +, just met the question in your own programs, very confused,

CodePudding user response:

Draw a chart, the building of new out of the two dimensional array is continuous 16 space? And when you fread is when it is continuous,

CodePudding user response:

Well,, I also don't understand how this new from memory to find space, and the for (int I=0; i<4. I++)
A [I]=new int [4] here four pointer a [I] is not together?

CodePudding user response:

The two-dimensional array you totally new five times, each time new is continuous, but five new is discontinuous,
Can refer to this book:
"Deep understanding of the C pointer"

CodePudding user response:

Well well thank you!
  • Related