Dynamic memory allocation and release of two-dimensional array

zhaozj2021-02-17  76

// Dynamically assign two-dimensional array space {m_ihight = 10; // The height m_iwidth = 10 of the two - dimensional array; // Dynamically assigned a two-dimensional array m_pptable memory space // The type INT /// m_pptable points to the array int ** m_pptable; m_pptable = new int * [m_ihight];

/ / Dynamically assign M_IHTIT type INT * memory space // allocated is the line address space for (INT i = 0; I

// Dynamically assigned M_IWidth type INT memory space // allocated is a row of numerical space} // The assigned two-dimensional array space is not continuous // can use m_pptable [row] [col] to give This two-dimensional array assignment // wherein 0 <= row

转载请注明原文地址:https://www.9cbs.com/read-30009.html

New Post(0)