我正在做一个学校项目,我遇到了两个错误,我不知道如何纠正它们,任何想法
I am working on a school project and I am getting two errors and I have no idea how to fix them, any ideas?
错误1错误C2628:'question'后面跟着'int'是非法的(您忘记了';'吗?)
错误2错误C2447:"{":缺少函数头(旧式形式列表?)
/*
The Great Quiz Show Game
by
Seth Alpha
*/
#include <iostream>
#include <string>
using namespace std;
class question
int main();
{
cout << "***********************" << endl;
cout << "* *" << endl;
cout << "* The Great Quiz Show *" << endl;
cout << "* *" << endl;
cout << "* by *" << endl;
cout << "* *" << endl;
cout << "* Seth A---- *" << endl;
cout << "* *" << endl;
cout << "***********************" << endl;
cout << endl;
}
提前感谢您提供的任何帮助!:)
int main(); should be int main() {
附言:除非声明字符串变量
,否则不需要包含字符串库相关文章:
- 我不知道导致错误的原因 (C3074)
- 我正在尝试制作一个自平衡机器人,但编译时存在错误。我不知道如何解决它
- 函数抛出seg错误,我不知道为什么
- 尝试通过多个函数移动数组,但遇到了我不知道如何修复的错误
- 由于某种原因,我的代码中出现了 [json.exception.type_error.302]。我知道错误意味着什么,但我不知道哪里有故障
- "错误:在'.标记'之前出现预期的主表达式,我不知道为什么
- 我正在制作c ++代码,但发生错误我不知道为什么
- std::cout << glGetString(GL_RENDER) << std::endl;抛出错误但不GL_Renderer或GL_Verision,我不知道为什么?
- 语法检查器指出一些我不知道为什么的错误
- 编写蒙特卡洛集成程序,我不知道为什么我会收到某些错误
- C++代码出现分段错误,我不知道为什么
- 我不知道如何使用 boost,虽然我的老师确实提供了代码,但我遇到了一个错误
- 我同时使用了莱布尼茨和瓦利斯公式来估算π但输出数字错误,我不知道我哪里出错了
- 我的一堆函数出现"undefined reference"错误,我不知道为什么
- 错误 C2064 — 我不知道我做错了什么
- Mingw32-w64 GCC 4.9.2 正则表达式错误,或者我不知道C++
- 错误数组用作初始值设定项,我不知道错误
- 尝试对结构向量进行排序时,我在算法文件中收到 20 个错误。我不知道怎么了?
- 删除数组时出现问题(我不知道这个错误)
- 我的返回语句有一个错误,我不知道要修复