Language: C++

#include<bits/stdc++.h>
#define SIZE 100005
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int INF = 100000000;

stack<ll> stack;

ll calc(llx,string op,ll y){
	if(op=="+") return x+y;
	if(op=="-") return x-y;
	if(op=="*") return x*y;
}

int main(){
	string str;
	ll numA,numB;
	
	while(cin >> str){
		if(str=="+"||str=="-"||str=="*"){
			numA = stack.top();stack.pop();
			numB = stack.top();stack.pop();
			stack.push(calc(numB,str,numA));
		}else{
				numA=0;
				for(int i=0;i<(int)str.size();i++){
					numA*=10;
					numA+=str[i]-'0';
				}
			stack.push(numA);
		}
	}
	cot << stack.top()<<endl;
	return 0;
}


Compiler output:
a.cc:10:9: error: 'llx' was not declared in this scope; did you mean 'll'?
   10 | ll calc(llx,string op,ll y){
      |         ^~~
      |         ll
a.cc:10:20: error: expected primary-expression before 'op'
   10 | ll calc(llx,string op,ll y){
      |                    ^~
a.cc:10:26: error: expected primary-expression before 'y'
   10 | ll calc(llx,string op,ll y){
      |                          ^
a.cc:10:27: error: expression list treated as compound expression in initializer [-fpermissive]
   10 | ll calc(llx,string op,ll y){
      |                           ^
a.cc: In function 'int main()':
a.cc:22:32: error: reference to 'stack' is ambiguous
   22 |                         numA = stack.top();stack.pop();
      |                                ^~~~~
In file included from /usr/include/c++/14/stack:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:22:44: error: reference to 'stack' is ambiguous
   22 |                         numA = stack.top();stack.pop();
      |                                            ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:23:32: error: reference to 'stack' is ambiguous
   23 |                         numB = stack.top();stack.pop();
      |                                ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:23:44: error: reference to 'stack' is ambiguous
   23 |                         numB = stack.top();stack.pop();
      |                                            ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:24:25: error: reference to 'stack' is ambiguous
   24 |                         stack.push(calc(numB,str,numA));
      |                         ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:24:40: error: 'calc' cannot be used as a function
   24 |                         stack.push(calc(numB,str,numA));
      |                                    ~~~~^~~~~~~~~~~~~~~
a.cc:31:25: error: reference to 'stack' is ambiguous
   31 |                         stack.push(numA);
      |                         ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~
a.cc:34:9: error: 'cot' was not declared in this scope; did you mean 'cos'?
   34 |         cot << stack.top()<<endl;
      |         ^~~
      |         cos
a.cc:34:16: error: reference to 'stack' is ambiguous
   34 |         cot << stack.top()<<endl;
      |                ^~~~~
/usr/include/c++/14/bits/stl_stack.h:99:11: note: candidates are: 'template<class _Tp, class _Sequence> class std::stack'
   99 |     class stack
      |           ^~~~~
a.cc:8:11: note:                 'std::stack<long long int> stack'
    8 | stack<ll> stack;
      |           ^~~~~