how to find 2d array size in c++

后端 未结 9 826
余生分开走
余生分开走 2020-12-23 12:14

How do I find the size of a 2D array in C++? Is there any predefined function like sizeof to determine the size of the array?

Also, can anyone tell me h

9条回答
  •  时光取名叫无心
    2020-12-23 12:39

    #include
    using namespace std ;
    int main()
    {
        int A[3][4] = { {1,2,3,4} , {4,5,7,8} , {9,10,11,12} } ;
        for(int rows=0 ; rows

提交回复
热议问题