/in/foo.c:5:1: error: unknown type name 'class'
class Stack
^~~~~
/in/foo.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
/in/foo.c: In function 'Match':
/in/foo.c:42:2: error: unknown type name 'Stack'
Stack s;
^~~~~
/in/foo.c:52:5: error: request for member 'push' in something not a structure or union
s.push(1);//进入栈
^
/in/foo.c:43:6: warning: unused variable 'length' [-Wunused-variable]
int length=strlen(str);
^~~~~~
/in/foo.c:42:8: warning: variable 's' set but not used [-Wunused-but-set-variable]
Stack s;
^
/in/foo.c: In function 'main':
/in/foo.c:70:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
gets(str);
^~~~
In file included from /in/foo.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^~~~