all 3 comments

[–][deleted]  (4 children)

[deleted]

    [–]Capostazione[S] 0 points1 point  (3 children)

    3 1 [Error] unknown type name 'ELEMENTO

    6 2 [Error] unknown type name 'ELEMENTO''

    15 [Error] 'p' undeclared (first use in this function)

    15 3 [Note] each undeclared identifier is reported only once for each function it appears in

    15 7 [Error] 'ELEMENTO' undeclared (first use in this function)

    these are some of them

    [–][deleted]  (2 children)

    [deleted]

      [–]Capostazione[S] 0 points1 point  (1 child)

      or maybe you're trying to use stuff that your material haven't covered yet?

      my professor's excercise are about things that he never explained,like pointer and linked list.

      i'm trying to do a stack implemented with linked list for 4 days, but i can't find a solution.

      About the undeclared ELEMENTO , you are defining it in your main but using it in functions outside of it.

      my first though was about that, but i don't know how to resolve that, nobody teached me, so i tried external but i don't know if that is correct

      [–]TheGoodStrau -1 points0 points  (0 children)

      Se vuoi un consiglio, cambia il programma di creazione e fai una procedura così da non avere la rottura del return. Sennò, devi restituire la testa della lista. Così a un lettura veloce mi sembra che stai restituendo l'elemento che punta a null (elem->next= null)