#include<iostream>
void Road_Game();
{
int width = 11,height = 110;
int tires_first[4] ={width / 2 - 1,1,width / 2 - 1) + 1,1};
int tires_second[4];
char road[width][height];
for(int i = 0;i < width;i++)
{
for(int j = 0;j < height;j++)
{
if(i == 0||i == width - 1)
road[j] = '#';
else if(j == 0 || j == height - 1)
road[j] = '#';
else
{
road[j] = ' ';
}
}
road[width / 2 - 1][1] = '@';
road[((width / 2 - 1) + 2)][1] ='@';
road[(width / 2 - 1) + 1][2] = '+';
road[width / 2 - 1][3] = '@';
road[((width / 2 - 1) + 2)][3] ='@';
}
for(int i = 0;i < width;i++)
{
std::cout<<std::endl;
for(int j = 0;j < height;j++)
{
std::cout<<road[j];
}
}
}
int main()
{
Road_Game();
}
требует |7|error: expected unqualified-id before '{' token| , хотя границы не нарушены.
void Road_Game();
{
int width = 11,height = 110;
int tires_first[4] ={width / 2 - 1,1,width / 2 - 1) + 1,1};
int tires_second[4];
char road[width][height];
for(int i = 0;i < width;i++)
{
for(int j = 0;j < height;j++)
{
if(i == 0||i == width - 1)
road[j] = '#';
else if(j == 0 || j == height - 1)
road[j] = '#';
else
{
road[j] = ' ';
}
}
road[width / 2 - 1][1] = '@';
road[((width / 2 - 1) + 2)][1] ='@';
road[(width / 2 - 1) + 1][2] = '+';
road[width / 2 - 1][3] = '@';
road[((width / 2 - 1) + 2)][3] ='@';
}
for(int i = 0;i < width;i++)
{
std::cout<<std::endl;
for(int j = 0;j < height;j++)
{
std::cout<<road[j];
}
}
}
int main()
{
Road_Game();
}
требует |7|error: expected unqualified-id before '{' token| , хотя границы не нарушены.