foo.cc: In function 'int main()':
foo.cc:49:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%[^\r]",str[0]),getchar();
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
foo.cc:51:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n),getchar();
~~~~~~~~~~~~~~^~~~~~~~~~
foo.cc:54:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%[^\r]",str[i]),getchar();
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~