Reputation: 22270
I'm porting a header with this declaration:
struct tMaterialInfo {
char strName[255]; // the texture name
char strFile [255]; // the texture
BYTE color [3]; // the color of the object
};
The header has the following includes:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <fstream>
#include <vector>
#include <gl\gl.h> // Header File For The OpenGL32 Library
#include<gl\glu.h>// Header File For The GLu32 Library
#include <gl\glaux.h>
Where does that BYTE come from?
Upvotes: 30
Views: 82067
Reputation:
If you are programming C for Windows I assume you are using Visual Studio to develop. You can right click on any keyword and select Go To Definition F12 to find where it is defined.
BYTE is defined in WinDef.h
typedef unsigned char BYTE;
Upvotes: 11
Reputation: 43306
Almost certainly from one of the many headers included from windows.h
. The Windows SDK has included typedef
s for BYTE
, WORD
, and DWORD
since at least Windows 2.0 days (the earliest Windows SDK I recall having).
Upvotes: 5