Skip to content

Instantly share code, notes, and snippets.

@fabianosalles
Last active November 27, 2019 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabianosalles/8fbe283f29c36f92a9c23be86902c1d3 to your computer and use it in GitHub Desktop.
Save fabianosalles/8fbe283f29c36f92a9c23be86902c1d3 to your computer and use it in GitHub Desktop.
/* Nó genérico, veja que o campo data
* é um ponteiro sem tipo, ou seja,
* pode apontar para qualquer coisa */
typedef struct _node {
void *data;
struct _node *next;
} Node;
typedef struct {
int count;
int data_size;
Node *head;
Node *tail;
} List;
/*
* Nova estrutura utilizando
* a lista genérica tanto para
* as tarefas, quanto para os telefones
*/
typedef struct {
char nome[80];
List *tarefas;
List *telefones;
} Pessoa;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment