Results 1 to 7 of 7

Thread: The size of an array

Threaded View

  1. #1

    Thread Starter
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 2004
    Location
    UK
    Posts
    671

    Resolved The size of an array

    I have created an integer array, i want to store the size of the array in a variable (for an insertion sort). But i get an error when i do the following code.
    Code:
    int[] myArray;
    int lastPos = myArray.length();
    The error is "cannot perform length() on an integer array" (or something similar to that, i'm not at my computer now so i cant see the error).

    What is the problem?
    Last edited by x-ice; Feb 25th, 2007 at 07:24 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width