Quel pourrait être l'erreur possible dans cette ligne:Initializer attendu avant 'double'
double bx;
bx je définis universellement! mais je reçois l'erreur ci-dessus sur la compilation. Même pour float bx; J'ai le même genre d'erreur.
Le code environnant est:
#include "header.h"
#include "ball_pad.h"
#include "pingpong.h"
#include "texture.h"
#include "3dsloader.h"
float A = 90.0f;
float B = 70.0f;
/**********************************************************
*
* VARIABLES DECLARATION
*
*********************************************************/
// The width and height of your window, change them as you like
int screen_width=640;
int screen_height=480;
// Absolute rotation values (0-359 degrees) and rotation increments for each frame
double rotation_x=0, rotation_x_increment=0.1;
double rotation_y=0, rotation_y_increment=0.05;
double rotation_z=0, rotation_z_increment=0.03;
// Absolute rotation values (0-359 degrees) and rotation increments for each frame
double translation_x=0, translation_x_increment=1.0;
double translation_y=0, translation_y_increment=0.05;
double translation_z=0, translation_z_increment=0.03;
// Flag for rendering as lines or filled polygons
int filling=1; //0=OFF 1=ON
//Now the object is generic, the cube has annoyed us a little bit, or not?
obj_type board,ball,pad_alongX,pad_alongY;
BALL ball1//,ball2,ball3;
double bx = 0;
double by = 0;
double bvx = 2.0;
double bvy = 2.0;
double radius = 5.0;
//ball2.bx = 0;ball2.by = 0;ball2.bvx = 2.0;ball2.bvy = 2.0;ball2.radius = 5.0;
//ball3.bx = 0;ball3.by = 0;ball3.bvx = 2.0;ball3.bvy = 2.0;ball3.radius = 5.0;
PADDLE pad1,pad2,pad3,pad4;
//pad1.px = 0;pad1.py = 0;pad1.pvx = 2.0;pad.pvy = 2.0;pad1.length = 25.0;pad1.width = 5.0;
L'erreur est prévue Initializer Avant 'double'. –
S'il vous plaît donner le code environnant aussi afin que nous puissions voir la grande image ici. Il se peut que ce soit la ligne avant cette ligne qui pose problème. –
Quel langage de programmation est-ce? – Liggi