Questions tagged as 'fila'

1
answer

Error in removing element from a list chained in c

The retiraLifo function is not working and there is some syntax error, but I have not found it. This function is to remove element from the list. insereLifo is working. The following error occurs:    C: \ Users [Warning] pas...
asked by 29.10.2016 / 03:42
1
answer

Problem inserting elements in a row

I made a function using the concept of static queue to insert an element, however, it is not running when I call it in main. I do not know if the problem is in it, in the main function or in the two rs ... follow insert function: #include<s...
asked by 24.06.2017 / 19:11
1
answer

Data Structure, Circular Row. Doubts about the Debug and Queuing methods

I can not understand the two else blocks in methods Desenfileirar and Enfileirar . More specifically the lines: this.tras = (++this.tras % this.info.length); this.frente = (++this.frente % this.info.length); Why use the...
asked by 16.05.2018 / 20:49
1
answer

Why is my code in C using queue giving segmentation fault?

Hello, I have to implement a queue that receives the name and cpf information, but only when I try to dequeue something does it give a fault, without the line of the normal dialer, but I can not see the error in it. #include <stdio.h> #in...
asked by 20.10.2018 / 17:04
1
answer

Error in my program C

I need to create a C program that removes (or copies) values from a queue using the output rules of a stack and adds them to a new structure. I mounted as below but two errors occur:    "undefined reference to 'WinMain @ 16'   File not fou...
asked by 04.06.2016 / 19:29
1
answer

Implementation of priority queue using vector

I'm implementing a priority queue using a vector, so my insert method works normally: public boolean inserir(int n){ if(estaCheia()) { return false; } if(estaVazia()) { fila[nItens++] = n; return true; } else { int i;...
asked by 21.12.2015 / 00:36
1
answer

Access attributes of type Object

I'm having difficulty accessing values of an attribute of type Object. I have a class in which has as attributes in prox, and Object Item. Each item is an object of the Subject class.
asked by 24.06.2018 / 22:53
1
answer

How to queue and dequeue with separate queues in JavaScript?

I have two queues, and each of these queues will be filled by 3 numbers. The user will put the numbers through prompt , which will appear on the screen only after insertion of the data. Until this part I am getting, but the problem is that...
asked by 10.10.2017 / 14:22
0
answers

Variable loses value before operation C #

I have not read C # for a while, I am doing a simple code to perform simulations on demand and process data by applying FIFO. My problem is regarding the variable attributes of the Queue class, I debugged the program and noticed that when I run...
asked by 25.09.2016 / 18:47
2
answers

Order Queue in C #

I already have this code: Queue<string> Fila = new Queue<string>(); //Declaração da Fila string opcao = "1"; //Define opção como 1 while (opcao == "1") //Enquanto ele quiser inserir pedidos { Console.WriteLine("Cliente:"); //...
asked by 02.07.2015 / 17:18