登陆QQ飞行岛出现的英文什么意思怎么解决?

发布时间:2024-05-21 07:54 发布:上海旅游网

问题描述:

登陆QQ飞行岛出现的英文怎么解决? 有人说是 显卡问题 我更新了四次显卡 怎么还是登不进去,谁要是有系统补丁软件或查找硬件更新的软件 可以推荐下。 本人QQ:357971530

问题解答:

#include <iostream>
#include <string>
#include<vector>
#include <algorithm>
#include <ctime>
#include<cctype>

using namespace std;
int main(int argc, char* argv[])
{
const int MAX_WRONG=8;

vector<string> words;
words.push_back("GUESS");
words.push_back("HANGMAN");
words.push_back("DIFFICULT");
words.push_back("TIGER");
words.push_back("YOU");

srand(time(0));
random_shuffle(words.begin(),words.end());
const string THE_WORD=words[0];
int wrong=0;
string soFar(THE_WORD.size(),'-');
string used="";

cout<<"Welcome to hangman.Good luck!\n";
cout<<"Please enter a letter in the right position!\n";
while((wrong<MAX_WRONG)&&(soFar!=THE_WORD))
{
cout<<"So far,the word is:"<<soFar<<endl;
char guess;
cout<<"\n\nEnter your guess:";
cin>>guess;
guess=toupper(guess);
while(used.find(guess)!=string::npos)
{
cout<<"\nYou've already guessed "<<guess<<endl;
cout<<"\nEnter your guess:";
cin>>guess;
guess=toupper(guess);
}
used+=guess;

if(THE_WORD.find(guess)!=string::npos)
{
cout<<"That's right!"<<guess<<" is in the word.";
for(int i=0;i<THE_WORD.length();++i)
if(THE_WORD[i]==guess)
soFar[i]=guess;
}
else
{
cout<<"Sorry,"<<guess<<" isn't in the word.";
++wrong;
if(wrong==7)
cout<<"\nAttention!You have only one chance.\n";
}
cout<<"You have "<<(MAX_WRONG-wrong)<<" incorrect guesses left.";
cout<<"You've used the following letters:"<<used<<".";

}

if(wrong==MAX_WRONG)
{
cout<<"\n\n\n\nYou've been hanged!";
}
else
{
cout<<"\n\n\n\nYou guess it!";

}
cout<<"The word was "<<THE_WORD<<".\n"<<"GAME OVER!\n";

return 0;
}

什么内容,搬上来看看呀

是有毛病咯

热点新闻