Witam, mam stworzyć strukture student która posiada zmienną id jako const i teraz pytanie kiedy tworze nowych studentów jak zrobić aby każdy z nich miał inne id ?
struct student {
const int id;
string nazwisko;
string specjalnosc;
float srednia;
};
vector<student> baza;
void DodajNowy() {
student nowy;
cout << "Podaj nazwisko: " << endl;
cin >> nowy.nazwisko;
cout << "Podaj specjalnosc: " << endl;
cin >> nowy.specjalnosc;
cout << "Podaj srednia: " << endl;
cin >> nowy.srednia;
baza.push_back(nowy);
}