/in/foo.cc:6:8: error: 'unit' was not declared in this scope
stack<unit> a;
^~~~
/in/foo.cc:6:12: error: template argument 1 is invalid
stack<unit> a;
^
/in/foo.cc:6:12: error: template argument 2 is invalid
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<t.length();i++){
~^~~~~~~~~~~
/in/foo.cc:34:15: error: request for member 'push' in 'a', which is of non-class type 'int'
a.push(t);
^~~~
/in/foo.cc:37:26: error: request for member 'top' in 'a', which is of non-class type 'int'
unit right=a.top();
^~~
/in/foo.cc:38:15: error: request for member 'pop' in 'a', which is of non-class type 'int'
a.pop();
^~~
/in/foo.cc:39:26: error: request for member 'top' in 'a', which is of non-class type 'int'
unit left=a.top();
^~~
/in/foo.cc:40:15: error: request for member 'pop' in 'a', which is of non-class type 'int'
a.pop();
^~~
/in/foo.cc:46:19: error: request for member 'push' in 'a', which is of non-class type 'int'
a.push(tt);
^~~~
/in/foo.cc:54:19: error: request for member 'push' in 'a', which is of non-class type 'int'
a.push(tt);
^~~~
/in/foo.cc:63:19: error: request for member 'push' in 'a', which is of non-class type 'int'
a.push(tt);
^~~~
/in/foo.cc:72:19: error: request for member 'push' in 'a', which is of non-class type 'int'
a.push(tt);
^~~~
/in/foo.cc:76:13: error: request for member 'top' in 'a', which is of non-class type 'int'
cout<<a.top().inf;
^~~