I got it.....this file works normally.....do you have an idea on sorting in a linked list?
Type: Posts; User: blacksnake
I got it.....this file works normally.....do you have an idea on sorting in a linked list?
typedef struct Node{
int data;
struct Node* prev;
struct Node* next;
struct Node(int data)//Expected unqualified-id before "int"
{
...
by the way, do you have push and pop function to get the right algorithm?
here is the algorithm and a code below in converting infix notation
1) if you encounter "(" push on it on stack
if(x[i]=='('){stack.push(x[i]);}
2) if you...
i was understood on appending the integers the problem was a precedence...can u show the code to me on the precedence of operators?
can you prove about the 2nd step in this kind of algorithm
?
i have some questions about that function:
when i apply to this code:
int main()
{
clrscr();
Stack *stack=new Stack(100);
char x[100];
printf("Input Equation: ");
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <stack>
using namespace std;
int main()
{
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <stack>
using namespace std;
int main()
{
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <stack>
using namespace std;
int main()
{
#include <iostream.h>
#include "D:/turboc/bin/stack.h"
#include <conio.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main()
{
clrscr();
i have a problem on converting infix to postfix evaluation and appending the characters in the string if the character is a digit
#include <iostream.h>
#include "D:/turboc/bin/stack.h"...
what are the header file do you used in this program?
i have an idea:
after reading the content of the file, follow the conversion of infix to postfix code below
main(int argc, char argv[])
{
char *a=argv[1];
int i, N=strlen(a);
where are the website in relation to this notation?
algorithm:
*open a file
*read the file character by character
*for( i=0;i<x;i++)//assuming that x is the number of times you operate inside the parenthesis, for example, ((2+3)5)+5, this...
but how and where do you evaluate an expression?
added to stack.h:
#define dsize 10000
class stack{
public:
stack(int size=dsize);
/*virtual*/~stack(void);
int isFull();
but how?
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include "stack.h"
int main()
{
char str[1500];
char file[10];
char sfile[10];
i have an algorithm on polish notation
content of the file eq.txt
((3+2)*5)+5
i will open the code using file io
if the stack is not used, i tried to use a stack to read the content of the file and displays the content in reversed
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include...
i have a code that causes errors in running the program...i use my header file stack.h on my program but it didn't work...what is the problem of that program?
#define DEFAULT_SIZE 10
class...
how to elaborate such description?
i was trying to plan on string reverse by open a file and read the content of the file...but I have a code for reading and writing the file...in reversing the content of the file, i already have a...