Home > database >  O solve, why would a line more than less ";"
O solve, why would a line more than less ";"

Time:09-20

CodePudding user response:

Written program has a problem, little semicolons brackets, specific what problem, can stick up for everyone to look at the code

CodePudding user response:

The
reference 1/f, February 16 response:
written program has a problem, little semicolons brackets, specific what problem, you can post the code to see if

Void updateWithoutInput ()
{
int i, j;
If (bullet_x & gt; 0)
Bullet_x -;
If ((bullet_x==enemy_x) & amp; & (bullet_y==enemy_y))
{
Score++;
Enemy_x=0;
Enemy_y=rand () % width;
Bullet_x=0;
}
If (enemy_x & gt; High)
{
Enemy_x=0;
Enemy_y=rand () % width;
}
If (speed==1)
For (int I=1; i<=10000; I++)
{
For (int j==1; J<=1000; j++);
Speed=1;
}
Speed=0;
If (speed==0)
{
Enemy_x + +;
Speed=1;
}
}
This is the part of the program, but also take a look at

CodePudding user response:

Void updateWithoutInput ()
{
int i, j;
If (bullet_x & gt; 0)
Bullet_x -;
If ((bullet_x==enemy_x) & amp; & (bullet_y==enemy_y))
{
Score++;
Enemy_x=0;
Enemy_y=rand () % width;
Bullet_x=0;
}
If (enemy_x & gt; High)
{
Enemy_x=0;
Enemy_y=rand () % width;
}
If (speed==1)
For (int I=1; i<=10000; I++)
{
for (int j=1; J<=1000; j++);
Speed=1;
}
Speed=0;
If (speed==0)
{
Enemy_x + +;
Speed=1;
}
}
You removed a=give it a try

CodePudding user response:

This problem have also upset
 if (speed==1) 
For (int I=1; i<=10000; I++)
{
For (int j==1; J<=1000; j++);
Speed=1;
}
Speed=0;

CodePudding user response:

The
reference 3 floor 姎 jacaranda response:
void updateWithoutInput ()
{
int i, j;
If (bullet_x & gt; 0)
Bullet_x -;
If ((bullet_x==enemy_x) & amp; & (bullet_y==enemy_y))
{
Score++;
Enemy_x=0;
Enemy_y=rand () % width;
Bullet_x=0;
}
If (enemy_x & gt; High)
{
Enemy_x=0;
Enemy_y=rand () % width;
}
If (speed==1)
For (int I=1; i<=10000; I++)
{
for (int j=1; J<=1000; j++);
Speed=1;
}
Speed=0;
If (speed==0)
{
Enemy_x + +;
Speed=1;
}
}
You removed a try=

Or not, there is still a mistake

CodePudding user response:

references on February 16, 4/f response:
this problem have also upset
 if (speed==1) 
For (int I=1; i<=10000; I++)
{
For (int j==1; J<=1000; j++);
Speed=1;
}
Speed=0;

But what is the problem (low ° u ° ")? ) I really can't find the

CodePudding user response:

I put you inside the function in the online compiler is not wrong, strange, wait for other prawns to solve

CodePudding user response:

If (speed==1)//there is no written braces
For (int I=1; i<=10000; I++)/the cycle what do you mean?
{
For (int j==1; J<=1000; j++);//for added a semicolon
Speed=1;
}
Speed=0;

CodePudding user response:

references on February 16, 9/f, reply:
if (speed==1)//there is no written braces
For (int I=1; i<=10000; I++)/the cycle what do you mean?
{
For (int j==1; J<=1000; j++);//for added a semicolon
Speed=1;
}
Speed=0;

Good?? Know?? Thank you for
  • Related