Questions tagged as 'lista-encadeada'

1
answer

Chained list returning empty out of function

I'm trying to read data from a .obj file and insert it into a linked list, I have a function to read and inside it I call the insert function. When I call the function to print the list inside the read function after having entered all th...
asked by 15.09.2017 / 02:27
1
answer

Problem removing the first node from the double-chained list

Good evening, I am trying to solve an issue that asked to remove students whose CR is less than 5. My biggest problem is to remove the first node (first student) from a double-chained list when there is only one node. I just gave free on the...
asked by 04.09.2017 / 01:50
1
answer

Chained list prints in addition to what is inserted

I have this function verticeobj* loadverticeObj(char *fname,verticeobj *vo){ FILE *fp; int read; float x, y, z; char ch; fp=fopen(fname,"r"); if (!fp) { printf("can't open file %s\n", fname); exit(1...
asked by 15.09.2017 / 19:10
1
answer

Printing the double-chained list in reverse order

Good morning, this is my first post here on Stack Overflow. I was trying to make a double-chained list print in reverse order. However, after going through this list in reverse, it produced the result unexpectedly. My code is printing more than...
asked by 02.09.2017 / 17:00
1
answer

Malfunction of the Remove method in the defined position in the Pivot List

The following method performs a removal of an element at a pre-defined position in the test class but does not appear to be working even though it has no syntax errors and errors in the test done by the teacher. public void removerPosicao(int...
asked by 15.08.2017 / 23:09
1
answer

Insert with "for" in a linked list

I'm having a question, the teacher asked me to insert elements in the linked list using "for" but I'm having difficulty, the class that creates the node is working perfectly and the part that I was able to develop was that nullPointException whe...
asked by 26.07.2017 / 19:22
0
answers

"Member access within misaligned address" with a linked list

I'm solving a leetcode problem (add two numbers that are inverted, each digit in a linked list node and return a linked list in response). When I give submit in response I get the following error: "Runtime error: member access within misaligne...
asked by 23.07.2017 / 19:17
0
answers

Remove even elements from a simply linked list

I'm making a function to remove ALL pairs from a list that is simply chained, but when I run the system, only one element is removed each time I call the function. Ex: Elements = {2, 4, 5, 3}, if I call the function, it deletes element 4, and af...
asked by 16.06.2017 / 01:50
1
answer

Error TESTE500K.c :(. text + 0x8f): undefined reference to 'INSERE'

Galera, I'm trying to create a list but are giving these errors TESTE500K.c :(.text + 0x8f): undefined reference to 'INSERE' TESTE500K.c: (. text + 0xa5): undefined reference to 'PRINT' [Error] ld returned 1 exit status I would have to...
asked by 14.06.2017 / 01:11
1
answer

Double-chained Lists Removal Doubt (C / Orderly Insertion)

In a C ++ class the teacher had proposed an activity where I had to do a program in the form of a double-chained list with ordered insertion. However, I have a problem in the Removal part. When removing all members from either end to the other...
asked by 12.05.2017 / 23:24