请教各位c++builder大侠 我定义了几个结构体 和一个类 怎么老是编译出现下列问题啊
structTIOCTL_SetParams{unsignedlongFlags;intHShift;unsignedshortPhase;unsignedshortGa...
struct TIOCTL_SetParams{
unsigned long Flags;
int HShift;
unsigned short Phase;
unsigned short Gain_R;
unsigned short Gain_G ;
unsigned short Gain_B ;
unsigned short Offset_R;
unsigned short Offset_G;
unsigned short Offset_B;
int VShift;
int PllShift;
unsigned long Grab_Flags ;
unsigned long Grab_Flags_mask;
};
struct TIOCTL_GrabFrame{
char * Pixels;
int Length;
int Width;
int Height;
unsigned long Palette;
};
struct TIOCTL_VideoMode{
int Width;
int Height;
int VFrequency;
};
struct TIOCTL_SendPS2{
unsigned short Address;
unsigned short Length;
char Data[63];
};
struct TIOCTL_getsn{
char SerialNumber[31];
};
enum TVGA_RGB{VGA_RED, VGA_GREEN, VGA_BLUE};
class TVGA2USB
{
private:
protected:
TIOCTL_VideoMode FMode;
TIOCTL_GrabFrame FFrame;
TIOCTL_SetParams FParams;
THandle FDevice;
TRect FRectangle;
int FFrameRate;
String LastError();
TMemoryStream ReadImage();
TMemoryStream CreateFrameBuffer();
TMemoryStream CreateImageHeader();
void GetParams();
void SetParams(unsigned long Flags);
int GetHshift();
int GetVshift();
int GetPLLshift();
unsigned short GetPhase();
unsigned short GetOffset(const TVGA_RGB What);
unsigned short GetGain(const TVGA_RGB What);
String GetSerialNo();
Variant GetFrameBPP(Variant P);
void SetHshift(int Value);
void SetVshift(int Value);
void SetPLLshift(int Value);
void SetPhase(unsigned short Value);
void SetOffset(const TVGA_RGB What,unsigned short Value);
void SetGain(const TVGA_RGB What,unsigned short Value);
public:
TVGA2USB(unsigned short DeviceID,unsigned long Format=(V2U_GRABFRAME_FORMAT_BGR24 ||
V2U_GRABFRAME_BOTTOM_UP_FLAG));
~TVGA2USB();
String SerialNumber();
TMemoryStream Image();
TRect Rectangle();
int Width();
int Height();
int Frequency();
int FrameRate();
int Horizontal();
int Verticle();
int PLL();
unsigned short Phase();
unsigned short Offset(const TVGA_RGB What);
unsigned short Gain(const TVGA_RGB What);
};
[C++ Error] VGA2USB.h(58): E2238 Multiple declaration for 'TIOCTL_SetParams'
[C++ Error] VGA2USB.h(58): E2344 Earlier declaration of 'TIOCTL_SetParams'
[C++ Error] VGA2USB.h(77): E2238 Multiple declaration for 'TIOCTL_GrabFrame'
[C++ Error] VGA2USB.h(77): E2344 Earlier declaration of 'TIOCTL_GrabFrame'
[C++ Error] VGA2USB.h(86): E2238 Multiple declaration for 'TIOCTL_VideoMode'
[C++ Error] VGA2USB.h(86): E2344 Earlier declaration of 'TIOCTL_VideoMode'
[C++ Error] VGA2USB.h(93): E2238 Multiple declaration for 'TIOCTL_SendPS2'
[C++ Error] VGA2USB.h(93): E2344 Earlier declaration of 'TIOCTL_SendPS2'
.
.
.
. 展开
unsigned long Flags;
int HShift;
unsigned short Phase;
unsigned short Gain_R;
unsigned short Gain_G ;
unsigned short Gain_B ;
unsigned short Offset_R;
unsigned short Offset_G;
unsigned short Offset_B;
int VShift;
int PllShift;
unsigned long Grab_Flags ;
unsigned long Grab_Flags_mask;
};
struct TIOCTL_GrabFrame{
char * Pixels;
int Length;
int Width;
int Height;
unsigned long Palette;
};
struct TIOCTL_VideoMode{
int Width;
int Height;
int VFrequency;
};
struct TIOCTL_SendPS2{
unsigned short Address;
unsigned short Length;
char Data[63];
};
struct TIOCTL_getsn{
char SerialNumber[31];
};
enum TVGA_RGB{VGA_RED, VGA_GREEN, VGA_BLUE};
class TVGA2USB
{
private:
protected:
TIOCTL_VideoMode FMode;
TIOCTL_GrabFrame FFrame;
TIOCTL_SetParams FParams;
THandle FDevice;
TRect FRectangle;
int FFrameRate;
String LastError();
TMemoryStream ReadImage();
TMemoryStream CreateFrameBuffer();
TMemoryStream CreateImageHeader();
void GetParams();
void SetParams(unsigned long Flags);
int GetHshift();
int GetVshift();
int GetPLLshift();
unsigned short GetPhase();
unsigned short GetOffset(const TVGA_RGB What);
unsigned short GetGain(const TVGA_RGB What);
String GetSerialNo();
Variant GetFrameBPP(Variant P);
void SetHshift(int Value);
void SetVshift(int Value);
void SetPLLshift(int Value);
void SetPhase(unsigned short Value);
void SetOffset(const TVGA_RGB What,unsigned short Value);
void SetGain(const TVGA_RGB What,unsigned short Value);
public:
TVGA2USB(unsigned short DeviceID,unsigned long Format=(V2U_GRABFRAME_FORMAT_BGR24 ||
V2U_GRABFRAME_BOTTOM_UP_FLAG));
~TVGA2USB();
String SerialNumber();
TMemoryStream Image();
TRect Rectangle();
int Width();
int Height();
int Frequency();
int FrameRate();
int Horizontal();
int Verticle();
int PLL();
unsigned short Phase();
unsigned short Offset(const TVGA_RGB What);
unsigned short Gain(const TVGA_RGB What);
};
[C++ Error] VGA2USB.h(58): E2238 Multiple declaration for 'TIOCTL_SetParams'
[C++ Error] VGA2USB.h(58): E2344 Earlier declaration of 'TIOCTL_SetParams'
[C++ Error] VGA2USB.h(77): E2238 Multiple declaration for 'TIOCTL_GrabFrame'
[C++ Error] VGA2USB.h(77): E2344 Earlier declaration of 'TIOCTL_GrabFrame'
[C++ Error] VGA2USB.h(86): E2238 Multiple declaration for 'TIOCTL_VideoMode'
[C++ Error] VGA2USB.h(86): E2344 Earlier declaration of 'TIOCTL_VideoMode'
[C++ Error] VGA2USB.h(93): E2238 Multiple declaration for 'TIOCTL_SendPS2'
[C++ Error] VGA2USB.h(93): E2344 Earlier declaration of 'TIOCTL_SendPS2'
.
.
.
. 展开
2012-07-10
展开全部
你的变量定义都不加int的么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询