90 Topics

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 nitin1

Hi guys, Here is the question: I have Activity A, Activity B. Now, A --> B . Now, pressed the home button. Now, go to any image & "open with" will show my app. when pressing my app as the option, it will hit Activity A. When it will hit …

0
194
Member Avatar for ddanbe

I'm referring to my snippet [Inheriting the stack class](https://www.daniweb.com/software-development/csharp/code/498828/inheriting-the-stack-class) After looong loong searches and many tries and tests, I finally came up with a version that works as I wanted to. Stacker can now handle any type of object, even with arethmetic methods in place. The virtual way as proposed …

Member Avatar for JOSheaIV
0
276
Member Avatar for ddanbe

Inheritance with generic types can sometimes be tricky. If you would inherit from a Stack<double>, no problem, but what if you want to keep it as generic as possible? Maybe it's a bad idea, but I wrote something like `class Stacker<T> : Stack<T>` and in Stacker I implemented some arithmetic …

Member Avatar for JOSheaIV
1
768
Member Avatar for brandon66

Im trying to implement queue with a linked list i think i have the enqueue function correct but im having problems with the dequeue. I can get it to delete the first number but then the rest of the list is empty can someone point me in the right direction? …

Member Avatar for brandon66
0
241
Member Avatar for sahar.97

how can I implement stack with one queue? the queue only can enqueue and dequeue

Member Avatar for sahar.97
0
214
Member Avatar for sami saba

hey there i find it difficult to write pseudocode of two stacks that sum two binary numbers and print the answer i can use a third stack for help. for example S1 is 11001110 and S2 101010 the answer will print 11111000 please help me with that

Member Avatar for Taywin
0
214
Member Avatar for yazici.batuhan

Consider a stack module like (two files stack.h stack.cpp) which supports the these functions; void push (stack *, std::string); std::string & pop(stack &); bool isEmpty(stack &); std::string & top (stack *); I didnt understand this part what it means. Also I declared stack like; struct stack { … }; But …

Member Avatar for Moschops
0
309
Member Avatar for Felix Arba

Hi guys , I'm giving you the full C# project I have uploaded , since I'm working with windows form , so you can see the source code and run it . http://www.sendspace.com/file/u7z6h0 And now , to explain my problem . The program I wanted to make is sudoku solver …

Member Avatar for Felix Arba
0
542
Member Avatar for phony

|29|error: expected unqualified-id before ‘{’ token| |27|error: new types may not be defined in a return type| |27|note: (perhaps a semicolon is missing after the definition of ‘DynStack<T>::StackNode’)| 46|error: ‘StackNode’ does not name a type| ||In member function ‘DynStack<T>::StackNode DynStack<T>::StackNode(T, DynStack<T>::StackNode*)’:| |40|error: ‘value’ was not declared in this scope| ||In …

Member Avatar for tinstaafl
0
1K
Member Avatar for Labdabeta

Hello, I have learnt a few assembly languages (MIPS/x86/ARM/MIX) and I have a question about the call stack. Each of those languages uses a different method for subroutine linkage, and the way I learnt them was not conducive to recursion. Granted, if I continue reading my copy of The Art …

0
173
Member Avatar for Humaira_1

I need a help in generating ideas to create a program using stack+queue. Real life example of stack+queue is needed. Pleaseeeee?

Member Avatar for darkagn
0
217
Member Avatar for babyluxe03

hello! im trying to make my own stack program in c++. but my code doesnt seem to work. I got 6 errors, been trying to figure out what are those and how to solve it but theres no progress. Can somebody help me with my project. I would greatly appreciate …

Member Avatar for Moschops
0
309
Member Avatar for blue_Student

Hi, I've been testing about converting infix to postfix expression. I've made the code and it compiles. My problem is it stops working when I run it. This involves the use of stack and arrays. I just call the method polish to get the strings infix and postfix, and to …

Member Avatar for deceptikon
0
347
Member Avatar for Ms

Hi, i need to program this algorthim using 2 stack in java, for example to evaluate such a given valid infix expression : (5*3)+(4/(6-2)). i need help, i don't know much about stacks.. Create two empty stacks, one for operands, and one for operators. Read infix expression as a string …

Member Avatar for Schol-R-LEA
0
270
Member Avatar for RounaqJJW

#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #define size 400 using namespace std; char infix[size],postfix[size],Stack[size]; int top; int precedence(char ch) { switch(ch) { case '^':return 5; case '/':return 4; case '*':return 4; case '+':return 3; case '-':return 3; default:return 0; } } char Pop() { char ret; if(top!=-1) { …

Member Avatar for Schol-R-LEA
0
972
Member Avatar for rahul8590

i have written many programs using stack , but how do i write a program to find whether the stack is progressing in forward or reverse direction . ?

Member Avatar for gurumukhi
0
181
Member Avatar for Griff0527

I am trying to write several different sorting algorithms in order to time the differences between them when reading a file of a half million integers. For testing purposes, I am only using a few hundred integers, but I am getting a stack overflow error. Also, for testing reasons, I …

Member Avatar for mike_2000_17
0
3K
Member Avatar for student125

I want to know how I can implement a function to open a file and read its contents into a linked list, and then print the contents reversed #include <stdio.h> typedef struct stack { char b[100]; int top; }stack; void push(stack *s,char k) { if(s->top==99) printf("\n Stack is full "); …

Member Avatar for Ancient Dragon
0
843
Member Avatar for Paulxh

I am trying to change the order of the stack using z-index. as my HTML, CSS and javascript function show in the code below. The three tables are all read into the same location, with only the last table being printed on the screen, since all tables use a white …

Member Avatar for Paulxh
0
2K
Member Avatar for inaxassan

I need help with implementing grow and shrink Here is the actually instructions---> •grow(). This method, when called, will “grow” arrayStack by utilizing the strategy outlined in 2 above. This method will only be called by push(). Note that grow() should be private. •shrink(). This method, when called, will shrink …

Member Avatar for JamesCherrill
0
179
Member Avatar for HankReardon

Hello, Would someone be willing to take a look at this segment of code? I am trying to figure out how this segment of code operates. I can see how the program can evaluate a simple prefix statement like + 7 6. I cannot see how the program can solve …

Member Avatar for HankReardon
0
251
Member Avatar for HankReardon

Hello Friends, I am having trouble with a homework assignment and was wondering if you would please take a look at it for me. I have to write a program that receives a prefix expression. Then it calculates and displays the result. It does this by using a stack to …

Member Avatar for HankReardon
0
317
Member Avatar for srivardhanms

Hi, Can anyone tell me how to create a class in C++ such that, the instance of that class cannot be created on stack? Am not able to figure out how to do it. Thank-you in advance, Sri

Member Avatar for srivardhanms
1
169
Member Avatar for connor.wells.7946

For this assignment due **3/4/2013**, I have to write a program to read in and evaluate a post fixed expression. I also have to print out the expression read in followed by the results of the evaluated expression (while handling the add, subtract, and multiply operators) and handle multi digit …

Member Avatar for rubberman
0
382
Member Avatar for fatalaccidents

Hey everyone, I'm new to the concept of stacks and queues. I think I have the basics, but I have a quick question. If I am wanting to swap an object, say x, for another object, say y, in a stack or a queue, is this possible without introducing an …

Member Avatar for bguild
0
222
Member Avatar for lulu79

I have datatable looks like below: ![table2](/attachments/large/3/table2.JPG "table2") I want to create a stack chart that will produce something like this: ![stack2](/attachments/large/3/stack2.JPG "stack2") I don't know where to start. I have google about how to create stack column but still can't get it. So far I have a chart but …

Member Avatar for lulu79
0
4K
Member Avatar for prakhs

Hi, Please help me debug this code. I made a Stack template with two parameters: type and size. I am using it two times: first in conversion from infix expression to postfix (here, <char,50> stack is used), then in evaluation of postfix expression (here, <long double, 50> stack is used). …

Member Avatar for prakhs
0
938
Member Avatar for mjbor1

**my code should check if the Entered string is a palindrome or not** // stack.h typedef char comp; struct nodetype; typedef nodetype* nodeptr; class stack{ public: stack(); bool isfull()const; bool isempty()const; void push(comp elm); void pop(comp& elm); ~stack(); private: nodeptr top; }; /******************************************** stack.cpp */ #include<iostream> #include"stack.h" #include<cstddef> #include<cstdlib> #include<cstring> …

Member Avatar for Lucaci Andrew
0
264
Member Avatar for kernelpassion

Below is the ip_options_build() in linux kernel 3.4, line 51 and 52: 51 if (opt->srr) 52 memcpy(iph+opt->srr+iph[opt->srr+1]-4, &daddr, 4); I understand that the two lines say, if source routing option is present, copy the destination address to the end of the option, that suggests that iph[opt->srr+1] is the length of …

0
164

The End.