Questions tagged as 'stack'

0
answers

What are stack trace and stack overflow? [duplicate]

The only thing I know is that it refers to memory usage but defines stack and why it happens so often?     
asked by 23.10.2017 / 02:22
2
answers

Vector by Parameter in C

I need to pass the position of Vector per parameter as follows code, my function receives the address and directly modifies the variable passed by parameter. However the program stops working and closes during compilation. Can someone help me ??...
asked by 10.10.2017 / 15:10
1
answer

Batteries with sequential allocation

I'm having trouble implementing the code in a stack using vectors: typedef struct pilha pilha; struct pilha { int *v; int topo; int tam_max; }; void Inicializar_Pilha (pilha pi, int tam_max) { pi.v=new int [tam_max]; p...
asked by 15.09.2017 / 07:21
1
answer

Warning on battery pointers

I'm trying to do a simple stack implementation, however the message appears:    warning: initialization from incompatible pointer type   -Wincompatible-pointer-types This warning appears on both line 20 and line 29. These pointers a...
asked by 15.09.2017 / 19:01
1
answer

Parallel Computing - communication between threads

This is a question that came up when I was trying to solve a problem on a client, the problem turned out to be something else but the doubt continued. Imagine a situation where there are two programs, prog1 and prog2 , where a dll is...
asked by 09.08.2017 / 10:56
1
answer

Store stack in txt file

I'm starting in C and I have the following problem. I need to save strings to a txt file sorted in stack, so far so good, however I need it when I open the program again, it keeps stacking always at the top, but it is overwriting what was alread...
asked by 04.06.2017 / 16:40
1
answer

How to access an attribute of an object within an object stack

I have several objects of class Vehicle with plate, model and yearFabri as attributes, inside a stack that I created (Stack.java). I need to apply a method in the Stack class, which removes objects from the stack until I find a Vehicle that has...
asked by 04.06.2017 / 20:06
1
answer

Question about queuing in C

Can someone analyze my code and see what could be wrong ?. It's a simulation exercise I got to do in college. Error: The code executes, but it goes into looping. Whats the problem? Code: #include <stdio.h> #include <stdlib.h> #d...
asked by 24.09.2016 / 20:38
0
answers

Program stack and row C

I created a program in C to remove (or copy) values from a queue using the output rules of a stack and add them to a new structure. But it is not working as I would like it to be. You are adding values with the queue rules, but I can not pull th...
asked by 04.06.2016 / 20:19
1
answer

Do deep search using a stack

I'm trying to do an in-depth search using a stack, but it's giving an error in if and I do not know why. package Grafos; import java.io.*; import java.util.*; public class Grafo { LinkedList<Integer> Arestas []; int n;...
asked by 31.08.2018 / 19:46