Mã chấm: 268098
Main.cc: In function ‘int main()’: Main.cc:11: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:15:13: warning: comparison with string literal results in unspecified behavior [-Waddress] if((a[i]=="a" && a[i+1]=="a") ||( a[i]=="b"&&a[i+1]=="b")) ^~~ Main.cc:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:15:28: warning: comparison with string literal results in unspecified behavior [-Waddress] if((a[i]=="a" && a[i+1]=="a") ||( a[i]=="b"&&a[i+1]=="b")) ^~~ Main.cc:15:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:15:43: warning: comparison with string literal results in unspecified behavior [-Waddress] if((a[i]=="a" && a[i+1]=="a") ||( a[i]=="b"&&a[i+1]=="b")) ^~~ Main.cc:15:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:15:56: warning: comparison with string literal results in unspecified behavior [-Waddress] if((a[i]=="a" && a[i+1]=="a") ||( a[i]=="b"&&a[i+1]=="b")) ^~~ Main.cc:15:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:17:23: warning: comparison with string literal results in unspecified behavior [-Waddress] else if(a[i]=="a"&&a[i+1]=="b") ^~~ Main.cc:17:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:17:36: warning: comparison with string literal results in unspecified behavior [-Waddress] else if(a[i]=="a"&&a[i+1]=="b") ^~~ Main.cc:17:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:19:23: warning: comparison with string literal results in unspecified behavior [-Waddress] else if(a[i]=="b"&&a[i+1]=="a") ^~~ Main.cc:19:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:19:36: warning: comparison with string literal results in unspecified behavior [-Waddress] else if(a[i]=="b"&&a[i+1]=="a") ^~~ Main.cc:19:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ~~~~~^~~~~~~~~ Main.cc:11:9: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] gets(a); ~~~~^~~