Main.cc: In function ‘int check(char*)’:
Main.cc:7:20: error: ‘string’ was not declared in this scope
int n = strlen(string);
^~~~~~
Main.cc:7:20: note: suggested alternative: ‘stdin’
int n = strlen(string);
^~~~~~
stdin
Main.cc: In function ‘int main()’:
Main.cc:30:13: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
gets(str);
^
In file included from /usr/include/stdio.h:862:0,
from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
gets (char *__str)
^~~~
Main.cc:27:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
Main.cc:30:9: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
gets(str);
~~~~^~~~~