| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/29/2007 15:44:00
|
highburycottage
Newbie
Joined: 03/29/2007 15:25:40
Messages: 2
Offline
|
Can somebody please help me with this problem. I have to initiate an array and then enter information into it via the scanner utility from a csv file. I can get the correct code to create or iterate over the array.
My code is as follows:
Thanks very much in advance to anybody who can put me out of my misery.
This message was edited 1 time. Last update was at 04/05/2007 18:11:15
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/29/2007 21:32:28
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline
|
I'll be glad to help but where are you having problems? If you're getting an error or if the program isn't running the way you want let us know some details. The more information you can provide the better.
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/30/2007 00:35:34
|
highburycottage
Newbie
Joined: 03/29/2007 15:25:40
Messages: 2
Offline
|
Scottish League Division 1,10
Airdrie United ,3,2,11,14,25
Clyde ,5,7,4,21,17
Dundee ,7,2,7,21,18
Gretna ,10,3,3,43,20
Hamilton Acas ,7,5,4,19,20
Livingstone ,6,6,4,21,15
Partick Thistle,8,4,4,25,29
Queen of South ,3,3,10,11,31
Ross County ,4,4,8,14,24
St Johnstone ,6,6,4,26,16
Above is the text file that I have to get into my system. The first line goes into the 'theLeague = new League(name, numberOfTeams);' under name and this works correctly. the second numberOfTeams(10) also has to create an array of ten teams. These ten teams Airdrie United down along with the numbers have to go into an Array. I am struggling to get the array to initialise and therefore am also struggling to get any of the information into it.
Thanks in advance
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 04/05/2007 18:14:17
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
highburycottage wrote:
The teams array is declared to hold instances of the Team class, however you're setting it to an integer.
You're going to have to invoke one of the Team class's constructors to initialize each item in the array.
This message was edited 1 time. Last update was at 04/05/2007 18:14:41
|
|
|
 |
|
|
|
|