Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct client{
- int index;
- string name;
- string surname;
- string city;
- int year;
- float sell;};
- client * delete(client array[], int &n){
- int j=0;
- int i;
- int a=0;
- int found=0;
- client *vet;
- for(i=0; i<n; i++){
- vet=new client[a+1];
- for(j=0;j<a;j++){
- if(array[i].index==vet[j].index){
- found=1;
- break;}}
- if(found==0){
- vet[a]=array[i];
- a++;}
- found=0;}
- n=a;
- return vet;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement