0

What I want to do is to make a searching engine for searching student`s grade in student list with student number and student name. If multiple students match the requested name, the system will ask the user to enter the student id.

I have done the read txt file, however, I stopped at changing txt to array for storing and searching. I don't know how to store those data into array.

I got 20 students and here's two examples of student's grading in each subject:

SS6709 Peter VT001 C VT002 E VT003 D VT004 D VT009 A+ VY018 A++ VT024 B

SS9830 Amy VT001 D VT002 C VT003 C VT004 D VT009 D VT018 D VT023 B

4

2 に答える 2

0

値を格納するには、独自のデータ構造を作成する必要があるようです。独自の構造体を定義できます

struct Student{
 string name
 string iD
 ....
};

この場合、型の配列を使用します Student

Student data_base[100];

これは非常に基本的なアプローチですが、うまくいくはずです...

于 2013-11-13T15:15:48.147 に答える