I cant seem to solve this error i have in the malloc line of code. The error is "SIGABRT". Please teach me how to solve this problem. Thank you.
typedef struct caminho{
int nCient;
struct caminho *next;
}Caminho;
Caminho *temp1 = (Caminho*) malloc(sizeof(Caminho));
Update:
typedef struct caminho{
int nCient;
struct caminho *next;
}Caminho;
Caminho *temp1 = malloc(sizeof(Caminho));
the only other structure in the program and the only other malloc:
typedef struct Cientista{
int nCient;
int nSignal;
int profundidade;
int distancia;
struct caminho *next;
} cientista;
cientista* vectorCientistas;
scanf("%d %d", &maxCientista, &maxCaminhos);
vectorCientistas = malloc(sizeof(cientista*) * maxCientista);