students data entry with c++ languge

hello, please send me a program with C++ : Student Information
1- It has a Function that save student name (over 100 names, length over 20 character) & Id (5 digits) & lessons (over 2 lessons) and end of data entry be -1 for id number.
2-It has a Function that get student information and sort by id.
3-It has a function that get id and if exist show informations 's student.
4- please with above function write a program.
thank a lot.
Who is Participating?
Post what you have done so far and we can point you to the errors.

BTW this question shall be in C++ TA
mssaburAuthor Commented:
Please help me to improve my solution myself source is here:
#incloude <iostream.h>
#incloude <conio.h>

void getstu (char,char,int);
void sort (int);
void search(int&);

class charlesson:
      char lsn1,lsn2;
            void showlsn()
                  char ans=1
                  cout<<"Please Enter ID's student:"<<lsn1<<'\t'<<lsn2;      

void getstu (char[20] name,charlessson lsn, int stuId)
void sort (int stuId);
void search(int& stuId)
      //binary search      
int main()
      char ans1='y'
      char ans2='y'
      int count=1;
      cout<<"Pleas enter student's informations\n"
            if (cout>100) cout<<"Sorry stongly we shall only up to 100 student
            break  ;
      cout<<"Would you like to have a quick sort? Please enter (y/n)";
      if (ans1=='y'|| ans1=='Y')
      else break;
      cout<<"Would you like to have a quick search? Please enter (y/n)";
      if (ans2=='y'|| ans2=='Y')
      else break;

//Please  help to complete, so it has very error
Don't forget to end _each_ statement with ';' !

Start with data structure to hold your student info. Safe bet is list<studentinfo*>.
Then define class studentinfo (I think it's a more meaningful name than charlesson). It should has 5-digit id (99999 - use unsigned int or long), name, lesson1, lesson2 data members
and members for sorting (compare) and printing student info. Don't forget destructor to deallocate data.

getstu() better return studentinfo* (NULL for id==-1) and you can push_back it to the list.
For sorting use STL sort based on bool studentinfo::idsorted(const studentinfo* si1, const studentinfo* si2).

Post your progress.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.