复制
收藏
提问
简洁
int main(){ std::cout<<"Let's play a game! If you can type the sentence below, then I'll tell you my password.\n\n"; std::string text="the quick brown fox jumps over the lazy dog"; std::cout<<text<<'\n'; std::string line; std::getline(std::cin,line); if(line==text){ std::ifstream password_file("/home/py/password.txt"); std::istreambuf_iterator<char> buf_it(password_file),buf_end; std::ostreambuf_iterator<char> out_it (std::cout); std::copy(buf_it,buf_end,out_it); } else{ std::cout<<"WRONG!!!\n"; }
1个月前
全网
文档
学术
百科
知识库
回答简洁模式
深入研究一些
你觉得结果怎么样?