Language: C++

#include <cstdio>
#include <string>
#define STACK_MAX_SIZE 1000

int main()
{
	using namespace contests;
	using namespace std;

	int foo, bar;
	char tmp[100];
	CStack *cs = new CStack;
	
	while (scanf("%s", tmp) != EOF)
	{
		if (tmp[0] == '+')
		{
			foo = cs->pop();
			bar = cs->pop();
			cs->push(foo + bar);
		}
		else if (tmp[0] == '-')
		{
			bar = cs->pop();
			foo = cs->pop();
			cs->push(foo - bar);
		}
		else if (tmp[0] == '*')
		{
			foo = cs->pop();
			bar = cs->pop();
			cs->push(foo * bar);
		}
		else
		{
			cs->push(stoi(tmp));
		}
	}

	printf("%d\n", cs->pop());
	delete cs;
}

namespace contests
{
	CStack::CStack()
	{
		top = 0;
	}
	void CStack::initialize()
	{
		top = 0;
	}
	bool CStack::isEmpty()
	{
		return top == 0;
	}
	bool CStack::isFull()
	{
		return top >= STACK_MAX_SIZE - 1;
	}
	void CStack::push(int x)
	{
		if (isFull())
		{
			fprintf(stderr, "Error : Stack Overflow\n");
		}
		// ???2?????????S[++top] = x;????????§??????
		top++;
		charS[top] = x;
	}
	int CStack::pop()
	{
		if (isEmpty())
		{
			fprintf(stderr, "Error : Stack Underflow\n");
		}
		top--;
		return charS[top + 1];
	}
}

namespace contests
{
	class CStack
	{
	public:
		// ?????????????????????
		CStack();
		
		// ?????°
		int		top;
		int		intS[STACK_MAX_SIZE];
		char	charS[STACK_MAX_SIZE];

		// ????????????
		void	initialize();
		bool	isEmpty();
		bool	isFull();
		void	push(int x);
		int		pop();

	private:
		
	};
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'contests' is not a namespace-name
    7 |         using namespace contests;
      |                         ^~~~~~~~
a.cc:12:9: error: 'CStack' was not declared in this scope
   12 |         CStack *cs = new CStack;
      |         ^~~~~~
a.cc:12:17: error: 'cs' was not declared in this scope
   12 |         CStack *cs = new CStack;
      |                 ^~
a.cc:12:26: error: 'CStack' does not name a type
   12 |         CStack *cs = new CStack;
      |                          ^~~~~~
a.cc:41:9: error: type '<type error>' argument given to 'delete', expected pointer
   41 |         delete cs;
      |         ^~~~~~~~~
a.cc: At global scope:
a.cc:46:9: error: 'CStack' does not name a type
   46 |         CStack::CStack()
      |         ^~~~~~
a.cc:50:14: error: 'CStack' has not been declared
   50 |         void CStack::initialize()
      |              ^~~~~~
a.cc: In function 'void contests::initialize()':
a.cc:52:17: error: 'top' was not declared in this scope
   52 |                 top = 0;
      |                 ^~~
a.cc: At global scope:
a.cc:54:14: error: 'CStack' has not been declared
   54 |         bool CStack::isEmpty()
      |              ^~~~~~
a.cc: In function 'bool contests::isEmpty()':
a.cc:56:24: error: 'top' was not declared in this scope
   56 |                 return top == 0;
      |                        ^~~
a.cc: At global scope:
a.cc:58:14: error: 'CStack' has not been declared
   58 |         bool CStack::isFull()
      |              ^~~~~~
a.cc: In function 'bool contests::isFull()':
a.cc:60:24: error: 'top' was not declared in this scope
   60 |                 return top >= STACK_MAX_SIZE - 1;
      |                        ^~~
a.cc: At global scope:
a.cc:62:14: error: 'CStack' has not been declared
   62 |         void CStack::push(int x)
      |              ^~~~~~
a.cc: In function 'void contests::push(int)':
a.cc:69:17: error: 'top' was not declared in this scope
   69 |                 top++;
      |                 ^~~
a.cc:70:17: error: 'charS' was not declared in this scope; did you mean 'char'?
   70 |                 charS[top] = x;
      |                 ^~~~~
      |                 char
a.cc: At global scope:
a.cc:72:13: error: 'CStack' has not been declared
   72 |         int CStack::pop()
      |             ^~~~~~
a.cc: In function 'int contests::pop()':
a.cc:78:17: error: 'top' was not declared in this scope; did you mean 'pop'?
   78 |                 top--;
      |                 ^~~
      |                 pop
a.cc:79:24: error: 'charS' was not declared in this scope; did you mean 'char'?
   79 |                 return charS[top + 1];
      |                        ^~~~~
      |                        char