I am using VC++. and am making an arkanoid game. i am setting up classes for my paddle, ball etc. i am having problems accessing the varible that i have put in the class. i am getting an unresolved external symbol.
i only what to access the varibles in the fuctions in the class.
my header file looks like this
#ifndef paddleh_h
#include <windows.h> // Header File For Windows
#include <stdio.h> // Header File For
#include <gl\gl.h> // Header File For The
#include <gl\glu.h> // Header File For The
#include <gl\glaux.h> // Header File For The Glaux
#include <math.h>
class Paddle
{
private:
private float paddle_xpos; // Position components
public:
Paddle();
~Paddle();
//Protypes
static void UpdatePaddlePosition(float);
static float GetPaddlePosition(void);
static void DrawPaddle(float);
static float LimitPaddleMovement(float);
static void ResetPaddle(void);
static void SpeedUpPaddle(void);
static void SlowDownPaddle(void);
};
#endif
my .ccp file looks like this..
#include "paddleh.h"
float Paddle::LimitPaddleMovement(float xpos)
{
if (xpos/*+BatWidth*/>=7.7)
{
xpos=7.7/*-BatWidth*/;
}
if (xpos/*-BatWidth*/<=-9.7)
{
xpos=/*BatWidth-*/-9.7;
}
return(xpos);
}
void Paddle::DrawPaddle(float xpos)
{
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(2.0f + xpos , 0.0f, 0.0f);//bottom right
glTexCoord2f(1.0f, 1.0f);
glVertex3f(-0.0f + xpos , 0.0f, 0.0f);//bottom left
glTexCoord2f(1.0f, 0.0f);
glVertex3f(-0.0f + xpos , -0.5f, 0.0f);//top left
glTexCoord2f(0.0f, 0.0f);
glVertex3f(2.0f + xpos , -0.5f, 0.0f);//top right
glEnd(); // Done Drawing The Quad
return;
}
void Paddle::UpdatePaddlePosition(float xpos)
{
if (xpos<0)
Paddle:

addle_xpos += xpos;
else
Paddle:

addle_xpos -= xpos;
return;
}
float Paddle::GetPaddlePosition(void)
{
return(Paddle:

addle_xpos);
//return(2);
}
any help would be greatful.