class StudentEntry
{
public:
StudentEntry(NAME name, MARK mark): name(name), mark(mark){}
voidoperator = (StudentEntry *entry)
{
name = entry->name;
mark = entry->mark;
}
NAME name;
MARK mark;
}*entryList[MAX_STUDENT];
}*entryList[MAX_STUDENT]; <-- what is this, and how do it work? can someone give me a few more examples of how to use this?
I ask because I am trying to create a header file that do all the fstream stuff for me--looking for a way to take in an entire file/list, and pass it to a class. I tried to use vector but that didn't work too well, so I found this examples here. But I have problem manuplating it. Some help/hint/explaination/guidance/examples would help me out a lot. Thank You. ^_^
Basically, you're, in the same statement, declaring a class and a global array of MAX_STUDENT (which is a #defined constant) pointers to the declared class.
class StudentEntry
{
public:
StudentEntry(NAME name, MARK mark): name(name), mark(mark){}
voidoperator = (StudentEntry *entry)
{
name = entry->name;
mark = entry->mark;
}
NAME name;
MARK mark;
};
StudentEntry* entryList[MAX_STUDENT];