how to get size of 2d array
how can i get size of array from row and colum seperatly
struct Matrix{
float m33[3][3];
float m44[4][4];
} chaos, enchant;
int main(){
cout << sizeof(chaos.m33)<< endl;
cout << sizeof(chaos.m44)<< endl;
cout << sizeof(chaos.m33[0][0])<< endl;
return 0;
}
float array[x][y]rowsize = sizeof( float ) * xcolsize = sizeof( float ) * ytotalsize = sizeof( float ) * x * yortotalsize = sizeof( array )
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement