Main.cc: In function ‘int main()’:
Main.cc:9:11: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
gets(a);
^
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:11:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a[i]='?'){
~~~~^~~~
Main.cc:12:22: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a[i-1]='a')
~~~~~~^~~~
Main.cc:14:22: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a[i+1]='b')
~~~~~~^~~~
Main.cc:18:20: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
{if(strcat(a[j],a[j+1])=="ab")
~~~^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:126:1: note: initializing argument 1 of ‘char* strcat(char*, const char*)’
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
^
Main.cc:18:27: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
{if(strcat(a[j],a[j+1])=="ab")
~~~~~^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:126:1: note: initializing argument 2 of ‘char* strcat(char*, const char*)’
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
^
Main.cc:18:31: warning: comparison with string literal results in unspecified behavior [-Waddress]
{if(strcat(a[j],a[j+1])=="ab")
^~~~
Main.cc:20:22: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
if(strcat(a[j],a[j+1])=="ba")
~~~^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:126:1: note: initializing argument 1 of ‘char* strcat(char*, const char*)’
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
^
Main.cc:20:29: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
if(strcat(a[j],a[j+1])=="ba")
~~~~~^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:126:1: note: initializing argument 2 of ‘char* strcat(char*, const char*)’
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
^
Main.cc:20:33: warning: comparison with string literal results in unspecified behavior [-Waddress]
if(strcat(a[j],a[j+1])=="ba")
^~~~
Main.cc:7:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int N,dem=0;char a[1000000000];scanf("%d",&N);
~~~~~^~~~~~~~~
Main.cc:9:9: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
gets(a);
~~~~^~~