Questions tagged as 'lista-encadeada'

1
answer

Problem removing at first in a double-chained list

Hello. When I try to use the "remove" function to remove the first element from the list, apparently nothing happens. But, shortly after using the function remove and try to insert a new node in the list, it does not insert, and the second time...
asked by 16.09.2018 / 01:23
1
answer

How to make a pointer point to NULL?

I need a position of an element in a dynamic vector to be empty, so I can check if I can put an element inside it later. However, the compiler does not allow it. Here is my code: MATRIZ_ESPARSA *criar_matriz(MATRIZ_ESPARSA *matriz, int nr_linh...
asked by 06.11.2017 / 01:18
1
answer

Dynamic allocation problem - Targeting failure

Define two structures to represent a line. I need to open a file that contains the values of one line per line, putting the values in a linked list. This I was able to do. #include<stdio.h> typedef struct{ int x,y; }ponto; typedef struct...
asked by 10.03.2016 / 16:59
2
answers

Problem with pointer deallocation in chained list

I have a problem with the deallocation of pointers in my code a few days ago. I try to make sure that the point of my on-screen object is greater than one value, move this object out of memory, but for some reason this is not working and is givi...
asked by 02.10.2015 / 22:28
0
answers

Sort threaded list in MVC pattern design [closed]

In my project I'm using a threaded implementation of my own list, that is, I'm not using the Java API ready list. Also, my implementation is from a generic list, which has objects of type Object on their nodes, so that it can be used for any typ...
asked by 09.12.2015 / 17:10
2
answers

How to sort an alphabetized list alphabetically?

I have to make a program that creates a linked list containing structs with information from a participant (name, cpf ...). I have done the insert function and I want to sort the linked list in another function called sort. But the program...
asked by 15.10.2015 / 15:34
2
answers

Meaning of two asterisks in function call [duplicate]

I'm trying to understand a code on list simply chained. The function InserirInicio is set to Nodo **inicio, float dado . I could not understand the use of two asterisks in the parameter in this function in specific, would be fun...
asked by 22.12.2017 / 00:50
1
answer

Can anyone tell me why my console does not show any results?

Get a n value and print the following table using the for : 1 2 4 3 9 27 4 16 64 256 n n² n³ ... n^n I tried: import java.util.Scanner; public class Questao4 { public void Cadeia() { Scanner num = ne...
asked by 23.08.2018 / 03:54
1
answer

Print on the dynamic list screen

Personally I can not perform the print function on the screen, could help me in this function below. void imprime_lista(Lista* li){ while (li != NULL) { printf("%d ", li -> struct amatricula); li = li -> prox; } printf("\n");...
asked by 03.10.2017 / 16:40
2
answers

Array is not showing the data that should be there

Class Interface : switch(opcao) { case 1: Usuario umUsuario = new Usuario(); umUsuario.criarUsuario(); break; case 2 : System.out.println("Busca de usuario"); System.out.println("Forneça o cpf do usuario");...
asked by 09.11.2018 / 19:38