Warning on battery hands

Asked

Viewed 70 times

0

I’m trying to make a simple stack implementation, however the message appears:

Warning: initialization from incompatible Pointer type -Wincompatible-Pointer-types

inserir a descrição da imagem aqui

This Warning appears on both line 20 and line 29. These pointers are of the same type (no*) and the implementation works correctly. Can someone help me?

  • Do not put the code as an image, add it to the question, formatting it appropriately

1 answer

0


Vc defined its Node structure as being:

typedef struct _no {
   int item;
   struct no *prox;
} no;

The right thing would be:

typedef struct no {
   int item;
   struct no *prox;
} no;

Without the underscore

Browser other questions tagged

You are not signed in. Login or sign up in order to post.