Home > Back-end >  How the two dimensional array of programs written in C production can be put into header file called
How the two dimensional array of programs written in C production can be put into header file called

Time:12-06

How to use c + + write a header file, which contains can pass into the array size returns the two-dimensional 0 array function? thank you

CodePudding user response:

Array is on the stack, cannot return directly, you can use two ways to
One is packing to struct, it is to return a heap memory is a pointer,

CodePudding user response:

I want to make it similar to Python np. Zero (m, n) function or a class, enter the row and column value output a two-dimensional array (value is 0, and then the changes can be),
  • Related