FILE *fp; fp=freopen("test.txt","r",stdin); gets(getstr); 转载于:https://www.cnblogs.com/jwplus/p/3194527.html