Skip to content

Instantly share code, notes, and snippets.

@jacbar
Created March 28, 2010 13:28
Show Gist options
  • Save jacbar/346756 to your computer and use it in GitHub Desktop.
Save jacbar/346756 to your computer and use it in GitHub Desktop.
void zwieksz(student * tab, int &n){
system("cls");
student * kopia = new student[n] ;
for(int i=0; i<n; i++)
kopia[i]=tab[i] ;
delete[] tab ;
tab=new student[n+1] ;
for(int i=0; i<n; i++)
tab[i]=kopia[i] ;
delete[] kopia ;
tab[n].wczytaj();
n++;
}
student& student::operator=(student& wzor){
delete [] lista_przedmiotow;
imie=wzor.imie;
nazwisko=wzor.nazwisko;
nr_albumu=wzor.nr_albumu;
srednia=wzor.srednia;
n=wzor.n;
lista_przedmiotow = new string[n];
for(int i=0;i<n;i++)
lista_przedmiotow[i]=wzor.lista_przedmiotow[i];
return *this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment