2
How to increase the size of struct
when the current size is reached?
#define TAM_MAX 50;
typedef struct{
char nome[TAM_NOME]; /* nao pode ser vazio*/
char sobrenome[TAM_SOBRENOME];
char telefone[3][TAM_FONE]; /* modelo: '+99 (99) 9 9999 9999' */
char email[3][TAM_EMAIL]; /* 'modelo: a-z . _ 0-9 @ a-z . a-z . a-z' */
} TCONTATO;
TCONTATO agenda[TAM_MAX];
What’s wrong with the statement?
– Maniero
I refer to the statement of struct for use in a TAD.
– J.Carvalho
His typedef is correct. You just have to do
struct myStruct {
when your struct type is recursive.– hugomg
Precisely, a struct for TAD
– J.Carvalho
typedef struct myStruct{
 int value;
 int index;
 struct myStruct *front, *back; //próxima struct e anterior
}Index; //Lista duplamente encadeada
– J.Carvalho