Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to define and use multiple arrays for class/struct

Status
Not open for further replies.

sumpun

MIS
Feb 20, 2002
21
HK
I want to do is define multiple arrays inside a class or struct.

To be more precise, I want to to define a struct than contains an two or three arrays of another struct type. Is using classes easier ??

I want to do something like this :

public class mystudentclass
{
struct subject
{
string name;
string teacher;
string classroom;
}

struct student
{
string firstname;
string lastname;
int age;
subject[] subjects;
}
}

How can I do something like this ?? Or do I need to find some other way to do it


CHEERS !!

Sum Pun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top