我向以往一样做游戏,运行时出现了问题
#include <bits/stdc++.h>
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
using namespace std;
string a;
int b;
void print(char a[50][50])
{
for(int i=0;i<50;i++)
printf("%s\n",a[i]);
}
void HideCursor()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void color(int a)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
int main(){
HideCursor();
cout<<"欢迎来到小飞机端游\n\n请输入您的名字(小于10个字)\n";
cin>>a;
cout<<"-------------------------------------------------------------------------------";
cout<<"本游戏由xuxianshun666工作室出品,请勿抄袭,我们必追究!!\n\n";
cout<<"各位欢迎使用CSDN社区加我(本人社区:xuxianshun666)\n";
cout<<"-------------------------------------------------------------------------------";
system("pause");
system("cls");
cout<<"请选择您的战机(输入编号)\n";
cout<<" | | | | \n";
cout<<" -/ \- </ \> \n";
cout<<" | | | | \n";
cout<<"---| |--- ---| |--- \n";
cout<<" \ / \ / \n";
cout<<" \ / | | \n";
cout<<" | \ / \n";
cout<<" | | \n";
cout<<" (1) (2) \n";
cin>>b;
if(b==1)
{
char m[50][50]={
" | | ",
" -/ \- ",
" | | ",
"---| |---",
" \ / ",
" \ / ",
" | ",
" | ",
};
}
if(b==2)
{
char m[50][50]={
" | | ",
" </ \> ",
" | | ",
"---| |---",
" \ / ",
" | | ",
" \ / ",
" | ",
};
}
print(m);
cout<<"这是您的飞机,你需要和它一起并肩作战!!\n\n"
}
return 0;
}
[Error] expected ';' before '}' token
帮我指出问题并改正