Skip to content
Snippets Groups Projects
Commit cffc94d9 authored by Andreas Blakli's avatar Andreas Blakli
Browse files

La til ny funksjon: hentTidNaboStopp() i stoppested.cpp og deklarasjon i stoppested.h.

parent 41964524
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@ void Stoppested::lesData() {
}
void Stoppested::skrivData() {
}
void Stoppested::skrivDataMedNaboer(vector<Stoppested*> alleStoppesteder) {
......@@ -41,3 +40,11 @@ void Stoppested::skrivDataMedNaboer(vector<Stoppested*> alleStoppesteder) {
}
if (!naboEksisterer) cout << "\nIngen naboer registrert!" << '\n';
}
int Stoppested::hentTidNaboStopp() {
int storrelse = antallMinutterTilNaboStopp.size();
if (storrelse > 0) {
return antallMinutterTilNaboStopp.back();
}
return -1;
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ class Stoppested {
void lesData();
std::string hentNavn();
void skrivDataMedNaboer(std::vector<Stoppested*> alleStoppesteder);
int hentTidNaboStopp();
};
#endif //__STOPPESTED_H
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment