200分的c++问题,不难的,大家都来帮忙啊,谢谢大家!!!

来源:百度知道 编辑:UC知道 时间:2024/06/28 07:25:39

程序已经初步测试成功,主要代码如下。调试的时候数据要和代码文件同一个目录,非调试运行时则要和exe同一个目录。功能和要求略有出入,没有很仔细看题目。再,其他文件有一些小小的错误,编译时可以找出来,不说了。

/*
* File: wordz.cpp
* ---------------
* This program plays a game of Wordz.
*/

#include <iostream>
#include <cctype>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include "randword.h"

using namespace std;

#define INITIAL_GUESSES 8

/*
* Function: GiveInstructions
* Usage: GiveInstructions();
* --------------------------
* This function prints the rules to Wordz.
*/
void GiveInstructions(void)
{
cout<<"Welcome to Wordz!\n\n";
cout<<"I will select a secret word. On each turn, you guess\n";
cout<<"a letter. If the letter is in the secret word, I\n";
cout<<"will show you where it appears; if not, a part of&