How to dynamically create a two-dimensional array

zhaozj2021-02-16  47

Dynamically create a one-dimensional number of groups

INT * Arr; // it can be any other type (char, float ...) arr = new int [n]; // N shop be integer variable

Dynamically create two-dimensional array int ** arr; int N, m; cin >> n >> m; arr = new int * [n]; for (int i = 0; i

original:

http://www.cpp-home.com/fileio_tutorial.php

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

New Post(0)