size of a 2D array - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

size of a 2D array

Hi everebody

I'm working with 2D arrays and in a part of a program I need to know the dimensions of a 2D array. By using the sizeof operator i can get the number of cells in the array, but this is not enough. I wonder if there is a function or operator that returns the size of a 2D array, i.e., number of columns and rows.

Thanks for yor time


emilio

Comments

  • DB1DB1 Posts: 1,142Member
    : Hi everebody
    :
    : I'm working with 2D arrays and in a part of a program I need to know the dimensions of a 2D array. By using the sizeof operator i can get the number of cells in the array, but this is not enough. I wonder if there is a function or operator that returns the size of a 2D array, i.e., number of columns and rows.
    :
    : Thanks for yor time
    :
    :
    : emilio
    :

    No there sure isn't. You need to keep track of that yourself. In memory, a 2D array is the same as a 1D array.






    [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

Sign In or Register to comment.