Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   С/С++, C#, Delphi, .NET, Asm (https://forum.antichat.xyz/forumdisplay.php?f=24)
-   -   идентификатор byte в C++ (https://forum.antichat.xyz/showthread.php?t=86916)

fire64 30.09.2008 16:34

идентификатор byte в C++
 
здравствуйте, подскажите, что не так в данной структуре

PHP код:

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 использовать ;)


Время: 09:04