surfing101
Programmer
I previously posted this, but it got erased. I am currently getting 1 error and I can't find it anywhere?
This is my error:fatal error C1083: Cannot open include file: 'stackADT': No such file or directory[/b]
Code:
//This program will implement the postfix evaluation. The program will read in a postfix string consisting of only multidigit numeric data and the +,-,*, and /operators. This program will call and print the result of evaluation algorithm.
//project2.cpp
//GregThimmes
#include <iostream.h>
#include <stdlib.h>
#include "stackADT"
int main ()
{
char line [100]
char * c_ptr;
int count=0;
cout << " Enter an expression and a multidigit number such as +,0,*,/ operators: "<<endl;
cin.getline(line,100);
for (c_ptr=line; *p_ptr==' '; ++c_ptr);
while (*c_ptr != '\0')
{
++count;
for (; (*c_ptr!= ' ') && (c_ptr !='0');
for (;(*c_ptr==' '); ++c_ptr);
}
cout << "This expresion has " <<count<< "values";
cout << endl;
int expresize = count;
Stack <char> intstack;
int index=0;
char value, operand1,operand2;
while (index < expresize)
{
if ((line[index] != '+') || ((line[index] != '-') || ((line[index] != '*') || ((line[index] != '/')((line[index] != ' '))
intstack.pushStack ( line [index]);
else
{
operand1 = intstack.popStack (line[index-1]);
operand2 = intstack.popStack (line[index-2]);
if (line[index]=='+')
value = operand1 + operand2;
else if (line[index]=='-')
value = operand1 - operand2;
else if (line[index]=='*')
value = operand1 * operand2;
else if (line[index]=='/')
value = operand1 / operand2;
intstack.popStack (value);
}
index++;
}
intstack.popStack (value);
cout << " The answer is " << value <<endl;
return 0;
}
This is my error:fatal error C1083: Cannot open include file: 'stackADT': No such file or directory[/b]