problem with arrays

sheldonj

New member
Joined
Mar 9, 2005
Messages
1
Programming Experience
Beginner
Im working on an assignment for my intro to vb.net class.. and im trying to set up a card game that will keep track of 5 players total money.. (its a card game)

I want all the players to start with 50 dollars ....

instinctively i have writen my code as such...

Dim playertotal(4) As Single = 50

but it says i can not do that...
is there a way to store an intial value into an array that will make all the values the same?
 
If the array is long (for example 500), you can initialize it with a For-Next loop after the declaration (dim).
Happy programming.
 
Back
Top