Just some simple erros by beginers

I can't find what is wrong in my program I can't run it
Thankyou in advance guys

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
 #include<iostream>
#include<stack>
#include<string>
#include<sstream>
using namespace std;

bool isOperator(const string& input);
void performOp(const string& input,stack<double>& caclStack);
int main();
{

	cout<<"Welcome to the RPN Calculator"<<endl;
	
	stack<double>  calcStack;
	string input;
	while(true)
	{
		//DisplayPrompt
		
		cout<<">>";
		
		//getInput
		
		cin>>input;
		
		//CheckForNumericValue
		
		double num;
			if(istringstream(input)>> num)
		{
			calcStack.push(num); 
		
		}
	
		//CheckForOperator
			else if(isOperator(input))
		{
				performOp(inpu,calcStack); 
		}	
			
		//CheckForQuit
			else if(input=="q")
		{
				return 0;
		}
		//InvalidOutput
			else
		{
			cout<<"InvalidInput"<<endl;
		}	
	}
	
}

bool isOperator(const string& input)
{
	string ops[]={"-","+","*","/"};
	{
		if(input== ops[i])
		return true;
	}	
}
return false;

}

void performOp(const string& input,stack<double>& caclStack)
{
	double lval,rval,result;
	
	rval=calcStack.top();
	calcStack.pop();
	
	lval=calcStack.top();
	calcStack.pop();
	
	if(input == "-")
	{
		result = lval - rval	
	}
	
	else if(input == "+")
	{
		result=lval+rval;	
	}

		else if(input == "*")
	{
		result=lval * rval;	
	}

	else
	{
		result= lval / rval
	}
	cout<<result<<endl;
	calcStack.push(result);


}	







closed account (48T7M4Gy)
Run your program and go through the compiler errors list from the top of the list, one by one and fix them. The first couple at least are very simple and well within your capability to comprehend and repair. That is, if you wrote the code yourself.
They will be obvious to fix. Use the shell on this site if you like by pressing the wheel at the top RH corner of the code block.

Good luck with the debugging section of your software development.

Come back with any message that is unfathomable, by all means.
Topic archived. No new replies allowed.