C++ equivlence of int[][] x.length



Hi,
In java, you can extract the height and width of an array. In C++, how can u
do the same?
In java, I do this
int width = img[0].length;
int height = img.length;

Type of img is int[][]
Thanks in advance
Jack


.



Relevant Pages

  • Re: How to get a raw IP-addr into byte-array?
    ... and sign-extends it to an int, which it passes to the println method. ... I assume that they mean an array like: ... my Java book clearly states that a byte is a SIGNED ...
    (comp.lang.java)
  • Re: 2 GIG the new 640 MB
    ... >>program will ever be able to create an array with more than 4 billion ... > autocasting it back to int when required. ... Java doesn't even see pointers -- unless one looks carefully. ...
    (comp.lang.java.advocacy)
  • Re: method parameters
    ... This is my second program with the JAVA, I need to use it to write ... The basic idiom for emulating pass by reference is to wrap the value in an array. ... public void someMethod(int w) ... public void resetSize(int x, int y) { ...
    (comp.lang.java.programmer)
  • Re: 2 GIG the new 640 MB
    ... >program will ever be able to create an array with more than 4 billion ... Java will need to undergo a transition to 64 bit like any ... autocasting it back to int when required. ... http://mindprod.com Java custom programming, consulting and coaching. ...
    (comp.lang.java.advocacy)
  • Re: How much fast is C++ than Java?
    ... What you'll find is that the Java indexing rules are nothing like as ... multidimensional array is an array of array objects. ... int main ...
    (comp.lang.c)