Making a get() Function for a struct pointer
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
|
#ifndef _H_Lista
#define _H_Lista
template <class T>
class Lista
{
private:
struct Jogador
{
Jogador *next;
Jogador *prev;
int num;
char nome[25];
char pos[2];
};
struct Equipa
{
char nome[25];
char id[3];
};
Jogador *head,*tail;
public:
bool existe;
Lista();
~Lista();
void removerEquipa(char id[3]);
void insereEquipa(char nome[25],char id[3]);
void inserirJogador(int num,char nome[15],char pos[2]);
char* getID();
//this is where the get function was supposed to be
};
#endif
|
Hi .. i would like to make a get funtion so that i can get the private attribute *aphead .. can anybody help me ?
Topic archived. No new replies allowed.