90 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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? … |
|
how can I implement stack with one queue? the queue only can enqueue and dequeue |
|
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 |
|
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 … |
|
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 … |
|
|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 … |
|
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 … |
|
I need a help in generating ideas to create a program using stack+queue. Real life example of stack+queue is needed. Pleaseeeee? |
|
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 … |
|
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 … |
|
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 … |
|
#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) { … |
|
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 . ? |
|
|
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 … |
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 "); … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 |
|
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 … |
|
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 … |
|
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 … |
|
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). … |
|
**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> … |
|
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 … |
The End.