View Single Post
  #1 (permalink)  
Old 01-22-2008, 08:55 AM
bluefloyd8 bluefloyd8 is offline
Member
 
Join Date: Jan 2008
Posts: 4
bluefloyd8 is on a distinguished road
Array of Objects
Hey All!

I need to make an array of objects ( of a class i created). I

Below is some of the code. I want to make an array, parsedInfo, of objects from the class ParsedSiteInfo. In a function not shown, I have a for-loop that calls the function createNewSite(). So the array needs to be able to grow dynamically.

Code:
private ParsedSiteInfo[] parsedInfo; private int sites = 0; private void createNewSite() parsedInfo[sites] = new ParsedSiteInfo(); sites++; }
I ran this code with some debug print statements and determine the program as a problem with this line:
Code:
parsedInfo[sites] = new ParsedSiteInfo();
Reply With Quote
Sponsored Links