foo.cc: In function 'int main()':
foo.cc:24:28: error: 'strlen' was not declared in this scope
p = (char *)malloc(strlen(A) + strlen(B));
^~~~~~
foo.cc:24:28: note: suggested alternative: 'mblen'
p = (char *)malloc(strlen(A) + strlen(B));
^~~~~~
mblen
foo.cc:25:9: error: 'strcpy' was not declared in this scope
strcpy(p, B);
^~~~~~
foo.cc:25:9: note: suggested alternative: 'strtoq'
strcpy(p, B);
^~~~~~
strtoq
foo.cc:26:9: error: 'strcat' was not declared in this scope
strcat(p, A);
^~~~~~
foo.cc:26:9: note: suggested alternative: 'struct'
strcat(p, A);
^~~~~~
struct
foo.cc:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
foo.cc:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", s1);
~~~~~^~~~~~~~~~
foo.cc:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", s2);
~~~~~^~~~~~~~~~