34 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for dwlamb

I am trying to set-up Postfix on my Ubuntu local web development machine for send-only e-mails using Gmail so I can test e-mails sent by a web app I am developing. These are the steps I have followed based on a recently posted tutorial found [here](https://tonyteaches.tech/postfix-gmail-smtp-on-ubuntu/): 1. Dowloaded and installed …

Member Avatar for chickenbirds
0
245
Member Avatar for Joemeister

I am trying to transform a infix mathematical expression into a postfix expression using the shunting yard algortihm but can only get so far by writing the pseudo code because I know exactly what to do through logical thinking but can't write the code that will help me do it. …

Member Avatar for iamthwee
0
598
Member Avatar for moaz.amin.37

postfix and prefix increment or decrement operators very very confusing for me i try my best but i can not understand the basic different between them plz help me i know The prefix form first performs the increment operation and then returns the value of the increment operation. The postfix …

Member Avatar for sepp2k
0
440
Member Avatar for Wayniepooo

Hi basically i need help , i am not good with c++ but i am trying my very best. i am currently stuck with trying to do an infix to postfix conversion that reads from a textfile. The text file contains the infix notations and the code is suppose to …

Member Avatar for Wayniepooo
0
1K
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
976
Member Avatar for destroyer333

So i believe i got my prefix working, now i'm trying to get my postfix working so that the class object happy should have its day increased by 1. Not sure whats wrong. Maybe the way it receives the month and day in the constructor? main #include <iostream> #include <string> …

Member Avatar for destroyer333
0
225
Member Avatar for greyfox32

I am working on a project for class. I have to write a program that reads in an infix expression and converts and it to postfix and evaluates it. Currently I have it to where I can convert an infix expression with no parentheses to postfix, but am having some …

0
167
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 programmer007

Is it possible to convert a postfix expression to prefix expression using only recursion? If possible what's the algorithm?

Member Avatar for Taywin
0
117
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
940
Member Avatar for mjbor1

i have problem in convert infix to postfix some expression evaluate it correctly and other no ex: c\*(a+b) evaluate it correctly but A\*(B\*C+D)+E doesn't evaluate correctly and there is another problem in finding result my code // convert.h const char SIZE=100; class stack { public: stack(); bool isempty()const; bool isfull()const; …

Member Avatar for mjbor1
0
370
Member Avatar for umesh314

Hi I am trying to run the post fix and pre fix operation in C++. The code which I tried is given below. #include <iostream> using namespace std; int main() { int a =0; cout << ++a + ++a + ++a << endl; // 7 a =0; cout << ++a …

Member Avatar for Lucaci Andrew
0
248
Member Avatar for DelilahDemented

The program runs and gives the correct data until it gets to the 4th line of the input. At the 4th line, the calculation is incorrect and when it gets to line 6 of the input, it just stops completely. I can't quite figure it out. Any help is greatly …

0
125
Member Avatar for compgeek22

Hello. I am trying to run a simple postfix notation code. It builds but doesn't run. Can anyone tell me if it's my code that is stopping it from running? Here is my code: `int main(int argc, char *argv[]){` char *a = argv[1]; int i, div, N = strlen(a); stack<int> …

Member Avatar for np complete
0
238
Member Avatar for rahul.ch

The o/p is 10. But shouldn't it be 9? Is it got anything to do with Postfix or variable scoping has a role to play?

Member Avatar for rahul.ch
0
169
Member Avatar for ashish karna

hi i want to convert the prefix form to postfix,prefix and infix form but when i input +5*62 it retuns only 2 what is wrong with my code can anybody help to solve this #include<stdio.h> #include<conio.h> #include<stdlib.h> #define Operator 1 #define notOperator 0 #define empty -1 struct node{ char item; …

Member Avatar for deceptikon
0
209
Member Avatar for maha khaled

Hi, i'am try to read postfix expression from txt file and evaluate it the input is "10 5 *" ,the output should be 50, but it shows -43 , where's the error ? here's my code #include <iostream> #include <iomanip> #include <fstream> #include<stdio.h> #include<ctype.h> #include<stdlib.h> using namespace std; #define SIZE …

0
108
Member Avatar for singularity~

I have an integer called: int pID = 0; Inside my while loop I'm using pID++; to increment it. Sometimes the pID doesn't get incremented and sometimes it will. My sample output would be. 0 1 2 2 2 3 4 5 5 6 7 Does anyone have an idea …

Member Avatar for singularity~
0
234
Member Avatar for cameronchuck

Hi! I am trying to write calculator in c++ that takes an infix expression, converts it to postfix, and calculates. I have the code that will do this written, but when I try to turn it into a class it gives my a Segmentation Fault. Here is my code... [CODE=c++]//calc.h …

Member Avatar for histrungalot
0
3K
Member Avatar for ThatGuywithCode

So basically I need to find a way to evaluate an infix that's been converted into a postfix. The code below takes an entered infix and converts it into a postfix but I don't know how to take that postfix and evaluate it. Every single tutorial I've seen evaluates a …

Member Avatar for WaltP
0
227
Member Avatar for alishanvr

[CODE] // Node .h #ifndef NODE_H_INCLUDED #define NODE_H_INCLUDED # include <iostream> using namespace std ; class Node { private: int object ; Node *nextNode ; public: Node() ; void setObject(int x) ; void setNext(Node *next) ; int getObject() ; Node *getNext() ; } ; #endif // NODE_H_INCLUDED //----------------------------------------------------- // Node.cpp …

Member Avatar for alishanvr
0
2K
Member Avatar for red_ferrari007

PROGRAM GETS COMPILED...BUT GIVES ERROR ARRAY OUT OF BOUNDS...PLEASE HELP AS SOON AS POSSIBLE !!! import java.io.*; class Evaluate { char postfix[]; int stack[]; int i,a,b,c,top,n; BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); Evaluate() throws IOException { System.out.println("ENTER ARRAY SIZE"); n=Integer.parseInt(input.readLine()); postfix=new char[n]; stack=new int[n]; top=-1; i=-1; } void readpostfix() throws IOException { …

Member Avatar for NormR1
0
326
Member Avatar for cgen

I need some idea how to correct this program. Though I think I understand the concept, my implementation is wrong. My program only prints the orignal string and does nothing with it. [CODE] public class ArrayStack<E> implements Stack<E> { protected int capacity; protected static final int CAPACITY = 1000; protected …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Marissak

The question I'm trying to answer is: Write an object oriented C++ program to translate an infix expression to postfix. I have done much of it but after I debug the only output is "Postfix:" and I cannot figure out why. This is my code so far: #include <iostream> #include …

Member Avatar for GouseKSyed
0
228
Member Avatar for VanHackman

Hello, Just wanted to know if its possible to perform server mirroring with a postfix-based mail server. If so... which will be the best way to do it?. Thanks!, VanHackman

Member Avatar for VanHackman
0
142
Member Avatar for solomon_13000

Why is the output 10 and not 9?. According to my understanding the count value is assign to b. Then the count value increment. Hence the output should be 9 instead of 10. However in this case the output is 10. Why?. [CODE] package com.nowhere.blogger.core.junit; public class Bunnies { static …

Member Avatar for AnkitKumar
0
198
Member Avatar for ronnieaka

here's the infix expression: [B]EXAMPLE 1[/B] a/(b+c)*d according to me, if [B]*[/B] is given higher precedence then [B]/[/B] , then this should be the postfix expression: [B]1) abc+d*/ [/B] if / has higher priority then * , then: [B]2) abc+/d*[/B] [B]question 1: [/B]which is correct?? 1 or 2 ? according …

Member Avatar for TrustyTony
0
238
Member Avatar for rockerjhr

main.c [CODE]#include "stack.h" #include "stack_interface.h" #include "lex.h" #include <stdio.h> #include <stdlib.h> #define PUSH(s,c) if(push_char(s,c) == ERROR){ printf("Fatal error in pushing symbol on stack.\n") ; exit(1) ; } #define POP(s,c) if(pop_char(s,c) == ERROR){ printf("Fatal error in poping symbol off stack.\n") ; exit(1) ; } #define TOP(s,c) if(top_char(s,c) == ERROR){ printf("Fatal error …

Member Avatar for Narue
0
250
Member Avatar for sun-tzu

I have been fighting with my server for days. I am trying to get postfix configured. I have it currently so that it can send mail, but receiving mail is a different story. This is my main.cf file: [ICODE] # Please be sure to read the /usr/share/doc/postfix/README.MDK file # to …

Member Avatar for davidchilders
0
235
Member Avatar for java_stud

i'm having a problem with my code for evaluating postfix expressions. any comments on what's wrong on my code? [code] import java.io.*; import java.util.*; import java.util.Stack; public class Eval { private Stack<String> operatorStack; private Stack<Integer> operandStack; public int evaluate(String output) { StringTokenizer s = new StringTokenizer(output);//divides into tokens int value; …

Member Avatar for ~s.o.s~
0
218

The End.