c++一个“巨大”问题~麻烦高手来。

来源:百度知道 编辑:UC知道 时间:2024/06/12 12:35:15
warning C4518: 'int ' : storage-class or type specifier(s) unexpected here; ignored
error C2143: syntax error : missing ';' before 'tag::id'
fatal error C1004: unexpected end of file found
以上是组建后出现的问题,搞了半天实在弄不懂啊!
我的程序太长了啊,估计就错在我后面编的类中,自能搞一段来:
#ifndef GUESS_H
#define GUESS_H

#include"draw.h" //文件包含

using namespace std;

//函数原型说明:
void instruction(int& choice); // 输出程序主菜单
void usergame(int i); // 人人对抗
void compgame(int i); // 人机对抗
void test(string word, char letter, int& numwrong, string& temp, int i); // 判断输入的字符是否是单词中的字符,如果是,替换到正确位置
void lchosen(char letter, string& letterchosen, int& check, int& chosencounter, int i); // 判断输入字符是否是单词的一部分,若不是则将其放入已经输入过的错误的字符集中
void rnd(string& word, int i); // 从随机文件中取一个单词
void drawman(int numguess, int numwrong, int i); // 画上吊的人
inline istream& Flush(istream& stream); // 清理输入流

class cguess//建

前面void initialset() 无返回值
后面int cguess::initialset() int型返回值

inline istream& Flush(istream& stream)后面少 ;

暂时就发现这些,要想挑出全部错误,你得把所有代码都贴出来

#include <iostream>
加上试一下.