Sintax error ?? BC31

icono
06 de Agosto del 2004
Estoy trabajando sobre la paleta de colores de la placa vga, por lo cual estoy usando el borland 3.1 sobre DOS en un proyecto que incluye 1 archivo cpp, archivos h, y asm. Sintacticamente parece estar todo en orden, pero a la hora del link, me da el error DECLARATION SYNTAX ERROR , cuando encuentra la declaracion de la clase en el archivo .h.
He cambiado el orden de los archivos h en el proyecto, pero cdo. encuentra la declaracion de la primera clase del primer archivo h vuelve a dar este error. Alguien puede darme una pista de que esta pasando?? Las keywords estan delaradas para borlandC. Envio uno de los archivos h, para que constaten de que no es aca el problema.

//MOUSE256.H

#ifndef __DOS_H
#include <dos.h>
#endif
#ifndef __STDLIB_H
#include <stdlib.h>
#endif
#ifndef _MOUSE256_H
#define _MOUSE256_H
#endif


//****************************************************************
// Class TMouse
//
// This class defines a group of functions and data structures
// which allow a DOS-based program to set up mouse-operated
// controls. A call-back mechanism allows regions of the
// screen to be defined which trigger calls to user-defined
// functions when the left mouse button is pressed and the
// cursor is within the defined region.
//
//****************************************************************

#define MOUSE_INT 51
#define BUTTON_DOWN 1
#define BUTTON_UP 0
#define BUTTON_LEFT 1
#define BUTTON_RIGHT 2
#define STANDARD_SET 1
#define NO_STANDARD 0
#define BUTTON_ENABLED 1
#define BUTTON_DISABLED 0
#define RUN_ENABLED 0
#define RUN_DISABLED 1

#define MC_RESET 0
#define MC_SHOWCURSOR 1
#define MC_HIDECURSOR 2
#define MC_GETSTATUS 3
#define MC_SETXLIMIT 7
#define MC_SETYLIMIT 8
#define MC_SETMICKEYS 15



class TMouse
{
private:
struct coord_t
{
int current_position;
int down_position;
int up_position;
int limit_min;
int limit_max;
} x,y;

struct button_t
{
int status;
int down_interval;
int up_interval;
} left,right;

struct list_t
{
int x_pos,y_pos;
int x_size,y_size;
int enable_flag;
int(*callback)();
struct list_t *next;
} list_head,*current_call,*list_tail;

union REGS inregs,outregs;
int standard_flag,run_flag,callback_count;
enum {TRUE,PROCESSED,FALSE} press_pending;

public:
TMouse();
~TMouse();
virtual int GetPositionX(void){return(x.current_position);};
virtual int GetPositionY(void){return(y.current_position);};
virtual void HideCursor();
virtual void ShowCursor();
virtual void SetMouseLimits(int,int,int,int);
virtual void SetStandardCallback(int(near*)());
virtual void SetCallback(int(near*)(),int,int,int,int);
virtual void DeleteCallback(int(near*)());
virtual void Run();
private:
void FlagReset();
void GetStatus();
void SetMickeysPerPixel(int,int);
} ;

Zeros Metalium
06 de Agosto del 2004
Pone el #endif del #ifndef _MOUSE256_H al final del archivo porque ahi no esta haciendo nada y el codigo se te redeclara en cada #include que le haces.

Suerte.