char *str1[30],str2[30],str3[30];
printf("please input three string:\n");
gets(str1);//这句直接报错未识别gets,添加了库函数include<string.h>
gets(str2);
gets(str3);
看一下这个,gets不推荐使用了。
http://www.cplusplus.com/reference/cstdio/gets/
C标准 (2011) 的最新修订版已删除了此功能。
该函数在 C++ 中已被弃用(从 2011 标准开始,遵循 C99+TC3)。
第一句话,str1[30]前面多了一个星号