64,680
社区成员
发帖
与我相关
我的任务
分享
#include <stdlib.h>
#include<iostream>
#include<fstream>
#include <string>
using namespace std;
main()
{
string s,key;
cin>>key;
ifstream is("qa.txt");
while(getline(is,s))
{
if(s.find(key)!=-1)
{
cout<<s;
break;
}
}
getchar();
return 0;
}