CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Problems with ArrayList

    Hi!

    I'm wondering what this line does:
    Code:
    ArrayList[][] grid = new ArrayList[100][50];
    
    water.grid[h][v].push_back(&i);
    
    // c and d are calculated values.
    ArrayList al = this.grid[c][d];
    What will
    Code:
    al
    hold exactly?

    Later on this is done:

    Code:
    int n = al.size();
    for (int q = 0; q < n; q++) {
       int j = ((Integer)al.get(q)).intValue();
       
       ........
    Shouldn't al.size() always just be 1 or am I missing something here?

    Please help

  2. #2
    Join Date
    May 2009
    Posts
    2,413

    Re: Problems with ArrayList

    Quote Originally Posted by Hachaso77 View Post
    I'm wondering what this line does:
    Well, It doesn't look like Java, rather C++.

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

Featured