Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <string>
- #define N 30
- struct student{
- string ime;
- string familia;
- string fn;
- float uspeh;
- }*pqr[N];
- void add_record(student[],int *);
- void second_record(student *[],int);
- void point_record(student *[],int);
- int search_name_max(student *[],int);
- void main(){
- student qz[N];
- int choice, num=0;
- do{
- cout<<"menu"<<endl;
- cout<<"1 nov zapis"<<endl;
- cout<<"2 tursene"<<endl;
- cout<<"3 izvejdane na danni na nai ymniq s nai golqm yspeh kappa"<<endl;
- cout<<"4 all"<<endl;
- cout<<"5 krai"<<endl;
- cout<<"izberi"<<endl;
- cin>>choice;
- switch (choice){
- case 1: add_record(qz,&num); break;
- case 2: search_record(pqr,num); break;
- case 3: add_record(qz,&num); break;
- case 4: add_record(qz,&num); break;
- system ("pause");
- }
- void add_record(student qz[], int *num){
- int br;
- cout<<"br="<<endl;cin>>br;
- for (int j=*num;j<*num+br;j++){
- cout<<"vuvedete danni za student № "<<j+1<<endl;
- cout<<"vuvedi ime"<<endl;
- cin.ignore();
- getline(cin,qz[j].ime);
- cout<<"vuvedi familiq"<<endl;
- getline(cin,qz[j].familia);
- cout<<"vuvedi fn"<<endl;
- cin>>qz[j].fn;
- cout<<"yspeh"<<endl;
- cin>>qz[j].uspeh;
- pqr[j]=&qz[j];
- } *num+=br;}
- void print_record(student *pqr[],int i){
- cout<<"/n ime"<<pqr[i]->ime<<endl;
- cout<<"/n familiq"<<pqr[i]->familia<<endl;
- cout<<"/n fn"<<pqr[i]->fn<<endl;
- cout<<"/n uspeh"<<pqr[i]->uspeh<<endl;
- }
- void search_record(student *pqr[], int num){
- bool flah=false;
- long int tfn;
- cout<<"nomer"<<endl;
- cin>>tfn;
- for(int i=0;i<num;i++){
- if(tfn==pqr[i]->fn){
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement