`fgets'--getcharacterstringfromafileorstream從文件或者流中獲取字符串stdin是標準輸入流示例1:charstrbuf[1024];fgets(strbuf,sizeof(strbuf),stdin);//處理strbuf示例2:file*fp=fopen("some_file.txt","r");if(fp){charstrbuf[1024];fgets(strbuf,sizeof(strbuf),fp);//處理strbuf}
@p2p
頂0
加入收藏
相關問答推薦