3
I’m looking to see if there’s any content on struct then wanted to initialize the variables as NULL, for if they were equal to NULL would know that they were not created.
snippets:
Struct:
struct Fila
{
int capacidade;
float *dados;
int primeiro;
int ultimo;
int nItens;
};
initialization:
struct Fila
PPFila = (Fila)NULL, <--- Erro de incompatibilidade
AUTFila = (Fila)NULL; <--- Erro de incompatibilidade
Creating:
if(PPFila == (Fila)NULL)
{
//
// Cria as filas que gerencias as o envio das threads
//
criarFila(&PPFila, 20);
}
Does anyone have any tips on how I can do this?
Lucas, please use the "c++" tag only for C++ problems. C is a different language.
– Pablo Almeida
@Pabloalmeida the problem also fits for C++, if he wants a solution for both C and C++, he can do this.
– Maniero
@Lucasfernandes you want me to stay at tag C++?
– Maniero
@bigown The question title asks for a solution in C. Also, C++ has different ways of dealing with things being done in the code. A C++ response would tend to educate the PA about these differences, and this can be a waste of time if the tag has been placed by ignorance.
– Pablo Almeida
@bigown can leave so, my interest is even in C
– Lucas Fernandes