two dimnensional arrays IN VB help please..

 
Post new topic    LakersGround.net Forum Index -> Off Topic Reply to topic
View previous topic :: View next topic  
Author Message
Laker_Town
Retired Number
Retired Number


Joined: 26 Jun 2006
Posts: 25604

PostPosted: Sun Sep 24, 2006 6:54 pm    Post subject: two dimnensional arrays IN VB help please..

okay, I have a project due dealing with 2 dimensional arrays but im having trouble with it.

IM not asking for freebie HW, but Im asking for help to understand this better. Mods, If you see fit, feel free to close this thread







Heres my situation:

Ive got to create a program for 10 students and 3 test scores for each student.

Im not sure how to enter values for specific subscripts and then match them with a students name..


ive dimmed strnames (10)
scores(0, 2)


again, IM not asking for the code, but an explanation,pseudo, if you will, about how to figure this thing out.

My plan is to use a listbox to enter the 10 names and then another listbox to enter the 3 scores. but I dont know how to match the scores with the names after that...



I probably didnt make any sense..lol
Back to top
View user's profile Send private message Reply with quote
Bergamotichek
Retired Number
Retired Number


Joined: 02 Sep 2007
Posts: 16777206

PostPosted: Sun Sep 24, 2006 7:09 pm    Post subject:

<watching closely>
Back to top
View user's profile Send private message Reply with quote
Laker_Town
Retired Number
Retired Number


Joined: 26 Jun 2006
Posts: 25604

PostPosted: Sun Sep 24, 2006 7:10 pm    Post subject:

i know...i just need an explanation..believe me, id rather understand the concept instead of just ripping it off.
Back to top
View user's profile Send private message Reply with quote
Mongo
Star Player
Star Player


Joined: 19 Jun 2001
Posts: 2585

PostPosted: Sun Sep 24, 2006 7:44 pm    Post subject: Re: two dimnensional arrays IN VB help please..

Laker_Town wrote:
okay, I have a project due dealing with 2 dimensional arrays but im having trouble with it.

IM not asking for freebie HW, but Im asking for help to understand this better. Mods, If you see fit, feel free to close this thread







Heres my situation:

Ive got to create a program for 10 students and 3 test scores for each student.

Im not sure how to enter values for specific subscripts and then match them with a students name..


ive dimmed strnames (10)
scores(0, 2)


again, IM not asking for the code, but an explanation,pseudo, if you will, about how to figure this thing out.

My plan is to use a listbox to enter the 10 names and then another listbox to enter the 3 scores. but I dont know how to match the scores with the names after that...



I probably didnt make any sense..lol


You are close.

Once you DIMed names and scores (i assume the score dim was a typo)
names(10)
scores(10,3)

just make sure you always use the same index for names and the first index of scores.

names(i)
scores(i,j)

hope that helps
Back to top
View user's profile Send private message Reply with quote
Laker_Town
Retired Number
Retired Number


Joined: 26 Jun 2006
Posts: 25604

PostPosted: Sun Sep 24, 2006 7:54 pm    Post subject:

okay.. so
scores has 10 rows, 3 columns..


now in order to get the first name's three scores:


name(0)=(0,0),(0,1)(0,2)??


this is not likely the syntax, but is the idea correct?

so the second name would be:

name(1)=(1,0),(1,1),(1,2)?
Back to top
View user's profile Send private message Reply with quote
Mongo
Star Player
Star Player


Joined: 19 Jun 2001
Posts: 2585

PostPosted: Sun Sep 24, 2006 7:55 pm    Post subject:

Laker_Town wrote:
okay.. so
scores has 10 rows, 3 columns..


now in order to get the first name's three scores:


name(0)=(0,0),(0,1)(0,2)??


this is not likely the syntax, but is the idea correct?

so the second name would be:

name(1)=(1,0),(1,1),(1,2)?


You got it.
Back to top
View user's profile Send private message Reply with quote
Laker_Town
Retired Number
Retired Number


Joined: 26 Jun 2006
Posts: 25604

PostPosted: Sun Sep 24, 2006 7:58 pm    Post subject:

thank you...
Back to top
View user's profile Send private message Reply with quote
24KaratGold
Franchise Player
Franchise Player


Joined: 13 Aug 2006
Posts: 17350

PostPosted: Mon Sep 25, 2006 7:44 pm    Post subject:

yay!

PS What class is this for?
_________________
Double rings > Double rainbow
Back to top
View user's profile Send private message Reply with quote
Addicus
Star Player
Star Player


Joined: 02 Sep 2005
Posts: 9642
Location: Dave's Pimp Palace

PostPosted: Tue Sep 26, 2006 1:34 pm    Post subject:

I just learned I have no idea what this is about.
_________________
Stop crying and start doing.

Twitter: http://www.twitter.com/addicusbrown
Back to top
View user's profile Send private message Reply with quote
Display posts from previous:   
Post new topic    LakersGround.net Forum Index -> Off Topic All times are GMT - 8 Hours
Page 1 of 1
Jump to:  

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum






Graphics by uberzev
© 1995-2018 LakersGround.net. All Rights Reserved. Privacy Policy. Terms of Use.
LakersGround is an unofficial news source serving the fan community since 1995.
We are in no way associated with the Los Angeles Lakers or the National Basketball Association.


Powered by phpBB