4 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for gajen007

Hi Friends, Recently I've experienced an issue in my (following) code. I've designed an array-stack and checked the values pushed in to it. It works well when pushing but when popping it doesn't display the whole popped values. E.g: If I pushed the values "zero to nine" in to the …

Member Avatar for rproffitt
0
311
Member Avatar for OrangeGrover

Hello, first off thanks for reading. So my problem occurs when I try to copy an element from one vector into a second vector. The error that I get says that the vector subscript is out of range when I try to push_back that element. I only get an error …

Member Avatar for OrangeGrover
0
309
Member Avatar for nwalser

Ok so I have to write a reverse method of a stack and I am not quite sure how to do it. I understand that i need to pop the strings from one stack into another but whenever I try to do this errors arise. Specifically it says it cannot …

Member Avatar for cale.macdonald
0
830
Member Avatar for Xufyan

in this program i've pushed 10 values into array but i use the condition [iCODE]if (tos==9)[/iCODE] which means no value should be stored at 10th position but when i am storing values, [iCODE]for (int i=1;i<=10;i++) first.push(i);[/iCODE] [CODE]class Stack{ int StackArray[] = new int[10]; int tos; Stack(){ tos=-1; } public void …

Member Avatar for NormR1
0
278

The End.