gets(buf)在linux下用gcc编译出现警告可以改为fgets(buf, MAX_PATH, stdin);//stdin 意思是键盘输入 同理:fputs(name, stdout); //stdout 输出