BALL ball1;//,ball2,ball3;
ball1.bx = 0;
ball1.by = 0;
ball1.bvx = 1.0;
ball1.bvy = 1.0;
ball1.radius = 5.0;
BALL is a struct in a separate.h file where I have used the following code :
typedef struct ball
{
GLfloat bx;
GLfloat by;
GLfloat bvx;
GLfloat bvy;
GLfloat radius;
}BALL;
typedef struct paddle
{
GLfloat length;
GLfloat width;
GLfloat px;
GLfloat py;
GLfloat pvx;
GLfloat pvy;
bool alongX;
}PADDLE;
But in the main file I am getting the above error !
The code in the main file is :
#include "header.h"
#include "ball_pad.h"
#include "pingpong.h"
#include "texture.h"
#include "3dsloader.h"
float A = 45.0f,AA = -45.0f;
float B = 35.0f,BB = -35.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;
ball1.bx = 0;
ball1.by = 0;
ball1.bvx = 1.0;
ball1.bvy = 1.0;
ball1.radius = 5.0;