Simply Chained List Printing/Abstract Data Type - ADT

Asked

Viewed 43 times

0

I’m having difficulty not implementing the void exibe_lst(Telem* lst) function, I can’t get the entered elements to be displayed due to a conversion I don’t know how to solve.

Follow the TAD link.

List

  • "I cannot get the inserted elements to be displayed due to a conversion" - how so ? What elements and what conversion ? Can you detail exactly what is happening and what is not working as you want and why? As well as the possible errors that are shown ? Take advantage and ask the question only the code relevant to the problem

1 answer

0


void exibe_lst(Telem* lst){
  Telem* i;

  for(i = lst ;i != NULL ;i = i->info )
  {
    printf("informacao: %d\n", i->info);
  }
}

in the i = i->info, não seria i = i->next?

  • yes. I have to print the information and not a pointer ... on the right printf ta and no for, this wrong. right is right @Netinhosantos. But the problem was in the prototypes, in the main archives. c, which had the function exibe_lst ... with void at the beginning and the parameter passage was wrong too. Now ta working that is a beauty.

Browser other questions tagged

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