PDA

Просмотр полной версии : идентификатор byte в C++


fire64
30.09.2008, 16:34
здравствуйте, подскажите, что не так в данной структуре


struct TTZFileHeader_t
{
char fileTypeString[4]; // "VTF" Valve texture file
int version[2]; // version[0].version[1]
int headerSize;

inline VTFFileHeader_t *pVTF( ) const
{
return (VTFFileHeader_t *)(((byte *)this) + headerSize);
};


unsigned short width;
unsigned short height;
unsigned int flags;
unsigned short numFrames;
unsigned short startFrame;
float bumpScale;
unsigned char numMipLevels;

unsigned char lowResImageWidth;
unsigned char lowResImageHeight;
};


в результате я получаю ошибки

d:\textures\texheder.h(38) : error C2065: 'byte' : undeclared identifier
d:\textures\texheder.h(38) : error C2059: syntax error : ')'

St0nX
30.09.2008, 17:59
по моему byte это тип и тут преобразование в указатель типа byte попробуй BYTE написать

ExZoD
30.09.2008, 17:59
может попробовать char использовать ;)