-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLista.h
executable file
·41 lines (30 loc) · 881 Bytes
/
Lista.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LISTA_H
#define LISTA_H
#include <iostream>
#include <sstream>
#include "Studenti.h"
using namespace std;
//Lista doppiamente concatenata
class Nodo
{
public:
Studenti var;
Nodo* next; //puntatore che punterà al successivo
Nodo* back; //puntatore che punterà al precedente
};
class Lista
{
Nodo* testa; //La testa
public:
Lista() { testa = NULL; } //Costruttore
~Lista(); //Distruttore
//Funzioni
Nodo* getTesta() const { return this->testa; }
void Inserisci(Studenti val);
Nodo* Ricerca(Studenti val);
Studenti Rimuovi (Studenti val);
//Dichiarazione dell'Overloading
friend
ostream& operator << (ostream& out, const Lista& ls);
};
#endif //Lista.h