[C++]
Given a dynamic two-dimensional array of size r x c. Implement the function bool deleteRow(int**& matrix, int r, int c, int row) that can remove a row from the matrix. Input: The two-dimensional matrix of size r x c and the remove position row. Output: The two-dimensional matrix after removing the row. Note: If the final row of the matrix is removed, the matrix parameter will return nullptr value as well as deallocate the memory previously used by the matrix. For example: Test Input Result 1 23 1 2 3 4 5 6 0 4 5 6
[C++]
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am