35 Topics
|
|
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 … |
|
[B]Expression evaluation using Emit[/B] This class was designed to evaluate simple mathematical expressions. But instead of developing a routine to do the calculating, we use Emit to dynamically build a method that does the math for us. IMPORTANT: This is done with integer math. 7/2*3 = 9, not 10.5 (or … |
|
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. … |
|
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 … |
|
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 … |
|
#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) { … |
|
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> … |
|
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 … |
|
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 … |
|
Is it possible to convert a postfix expression to prefix expression using only recursion? If possible what's the algorithm? |
|
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). … |
|
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; … |
|
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 … |
|
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 … |
|
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> … |
|
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? |
|
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; … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
[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 … |
|
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 { … |
|
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 … |
|
|
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 … |
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 |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.