#include <fstream>
#include <string>
using namespace std
int main(){
ifstream fin("thing.txt")
string s
while( getline(fin,s) ){
cout <<"Read from file: " <<s <<endl
if(s=="fun"){
system("k.exe sing.exe")
}else if(s=="sad"){
system("k.exe cry.exe")
}else if(s=="happy"){
system("k.exe fuck.exe")
}else if(s=="angry"){
system("k.exe argue.exe")
}
}
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)